Amazon Interview Question

Usually it's why the function didn't work.