To sort the elements of the array in ascending order