   Chapter 11.3, Problem 21ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

# Construct a table showing the result of each step when insertion sort is applied to the array a [ 1 ] = 7 ,   a [ 2 ] = 3 ,   a [ 3 ] = 6 ,   a [ 4 ] = 9 , and a [ 5 ] = 5 .

To determine

The table showing the action of insertion sort on the array.

Explanation

Given:

a=7,a=3,a=6,a=9,a=5

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

### Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

#### The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started 