FDM Group interview question

They asked me to sort an array in ascending order