Amazon Interview Question

I can't tell the specific Algorithm question.