Insertion Sort in a easy way

 Insertion Sort

The sorting of the array is very important in array implementation. So now, we will understand the insertion sort in a very easy way.

The idea to implement:

 Take a number from the array

Compare it with left numbers:

                if the left number is bigger:

                            move the left number to the right

                else

                            place the number 

Array = {78,89,45,23,10}


Array = { 89,82,63,54,32,23}




I hope you will understand the sorting if not try doing it by using a pen and paper
and still stuck and comment down..


Comments

Popular posts from this blog

ML sem 4 2021

Logistic Discriminant Analysis