Amazon interview question

Mostly coding question of medium difficulty