any sorting algorithm that uses comparisons of keys needs at least ( log ntime to accomplish the sorting notes sorting methods internal (in memoryquick sort heap sort bubble sort insertion sort selection sort shell sort external (appropriate for secondary storagemerge sort radix sort poly-phase sort insertion sort this is naturally occurring sorting method exemplified by card player arranging the cards dealt to him he picks up the cards as they are dealt and inserts them into the required position thus at every stepwe insert an item into its proper place in an already ordered list we will illustrate insertion sort with an example (refer to figure before presenting the formal algorithm examplesort the following list using the insertion sort method ( therefore insert before ( insert between ( insert between ( insert after ( insertion sort thus to find the correct position search the list till an item just greater than the target is found shift all the items from this point one down the list insert the target in the vacated slot repeat this process for all the elements in the list this results in sorted list algorithm of insertion sort insertion sort algorithm somewhat resembles selection sort array is imaginary divided into two parts sorted one and unsorted one at the beginningsorted part contains first element of the array and unsorted one contains the rest at every stepalgorithm takes first element in the lovely professional university