Amazon interview question

A system design problem.