Pregunta de entrevista de Amazon

The most complex problem I've ever worked on.