Amazon interview question

2 Questions on the OA