Amazon Interview Question

'Actual programming' puzzle relating to Big-O Notation and algorithm timing.