Amazon interview question

started with two technical questions timed assessment