Amazon interview question

Basic array question involved sorting