Macy's interview question

The interview is straight forward