Amazon interview question

Toughest problem you have solved with easy solution.