Scaler Academy interview question

How to sort an array