Insertion Sort is a sorting technique based on the idea of inserting a new element in a set of given elements so that the resulting elements are also in sorted order. Suppose a set of 4 elements A, A[l], A, A are to be sorted in ascending order. Initially sort Aand A[l] in ascending order. If A[l] is less than A, interchange their positions. Otherwise the positions of the elements remain the same. Next insert A in the appropriate position so that the resulting array A, A[l] and A remain sorted. The process is repeated in this manner.