We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Ok, so even though it says output the array after shifting, you have to output the array after finding the correct spot for the unsorted element. I forgot to do this for when the unsorted element has the smallest value.
Insertion Sort - Part 1
You are viewing a single comment's thread. Return to all comments →
Ok, so even though it says output the array after shifting, you have to output the array after finding the correct spot for the unsorted element. I forgot to do this for when the unsorted element has the smallest value.