Amazon interview question

I can't tell the specific Algorithm question.