Scaler Academy Interview Question

How to sort an array