Question: Suppose the following numbers are stored in an array A: 42,63,100,18,97,67,39,23,9,58,80,91 Apply insertion sort and quick sort algorithm to sort the array A and show
Suppose the following numbers are stored in an array
A: 42,63,100,18,97,67,39,23,9,58,80,91
Apply insertion sort and quick sort algorithm to sort the array A and show each pass separately
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
Insertion Sort algorithm 42 6310018976739239588091 Iteration 1 Compare 42 with 63 The comparison shows 42 63 Hence no swap required Iteration 2 Compare 100 with 63 Since 63 100 no swaping Compare 100 ... View full answer
Get step-by-step solutions from verified subject matter experts
