Insertion sortis a simple sorting algorithm that works similar to the way yousort playing cards in your hands. The array is virtually split into a sorted and anunsorted part. Values from the unsorted part are picked and placed at thecorrect position in the sorted part.Characteristics of Insertion Sort:This algorithm is one of the simplest algorithm with simpleimplementationBasically, Insertion sort is efficient for small data valuesInsertion sort is adaptive in nature, i.e. it is appropriate for data setswhich are already partially sorted.Working of Insertion Sort algorithm:Consider an example: arr[]: {12, 11, 13, 5, 6}12111356First Pass:Initially, the first two elements of the array are compared in insertionsort.12111356Here, 12 is greater than 11 hence they are not in the ascending orderand 12 is not at its correct position. Thus, swap 11 and 12.So, for now 11 is stored in a sorted sub-array.11121356Second Pass:Now, move to the next two elements and compare them11121356Here, 13 is greater than 12, thus both elements seems to be inascending order, hence, no swapping will occur. 12 also stored in asorted sub-array along with 11Third Pass:Now, two elements are present in the sorted sub-array whichare11and12Moving forward to the next two elements which are 13 and 5