Wrote a program to sort any given array