Amazon interview question

Mostly technical deep dive inside