Amazon Interview Question

Efficiency of any code you write...