Tag Archives: Insertion Sort

Insertion Sort

Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. For the 2nd, 3rd, 4th, etc. element: slide backwards into proper relative sorted position. This sort works on the principle of inserting an element at a particular position, hence the name Insertion Sort. Algorithm : for i in… Read More »