Sorting Algorithms, Insertion Sort, Algorithms, Dsa Courses, Dsa Training.
we will compare this key = 3 with the elements of the sorted array and place it to its correct position. As we can see 3 will be placed before 5. Now we have our sorted array as 3 5 6. In the same, way we will go further. We will update the key to 1, then compare it with every element of the sorted