Lifion Interview Question

Sorting a given array in multiple ways