Amazon Interview Question

The most complex problem I've ever worked on.