notes unsorted part and inserts it to the right place of the sorted one when unsorted part becomes emptyalgorithm stops sketchyinsertion sort algorithm step looks like thissorted partitial result < > unsorted data becomes sorted partitial result < unsorted data > examplesort { - using insertion sort - unsorted - - to be inserted - shift - reached left boundaryinsert- - to be inserted - shift - - insert - to be inserted - insert - to be inserted - shift - shift - insert - sorted the ideas of insertion the main operation of the algorithm is insertion the task is to insert value into the sorted part of the array let us see the variants of how we can do it "sifting downusing swaps the simplest way to insert next element into the sorted part is to sift it downuntil it occupies correct position initially the element stays right after the sorted part at each step algorithm compares the element with one before it andif they stay in reversed orderswap them let us see an illustration lovely professional university