Consider the following array and what is the status of the array after the fourth pass when we use the insertion sort?

Input: 12, 34,2, 45,1, 25

Output: 1, 2, 12, 25, 34, 45 

After the first pass: 12, 34, 2, 45, 1, 25

1
12, 34, 2, 45, 1, 25
2
2, 12, 34, 45, 1, 25
3
1, 2, 12, 34, 45, 25
4
1, 2, 12, 25, 34, 45 

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation