Construct a table showing the result of each step when insertion sort is applied to the array , and .
The table showing the action of insertion sort on the array.
Insertion sort is an algorithm for arranging the items in an array into ascending order. Initially, the second item is compared to the first. If the second item is less than the first, their values are interchanged and as a result the first two array items are in ascending order. When the last item has been placed, the entire array is in ascending order.
The table below shows the result of each step when insertion sort is applied to the particular array
Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!Get Started