To sort the elements of the array using insertion sort