Amazon interview question

logical and reasoning questions