UKG Interview Question

Sorting of array