Amazon Interview Question

Nothing difficult just basic concepts