Amazon interview question

Nothing difficult just basic concepts