Amazon Interview Question

Nothing difficult.