To sort the element of the array using insertion sort