Amazon interview question

Design pattern, Algorithm