Advertisements
Advertisements
Question
How would [34, 8, 64, 51, 32, 21] look like after second pass of insertion sort?
Options
34, 8, 64, 51, 32, 21
8, 34, 64, 51, 32, 21
34, 8, 51, 64, 32, 21
34, 8, 64, 51, 21, 32
MCQ
Advertisements
Solution
8, 34, 64, 51, 32, 21
Explanation:
Given array: 34, 8, 64, 51, 32, 21
After first pass: 8, 34, 64, 51, 32, 21
After second pass: 8, 34, 64, 51, 32, 21
shaalaa.com
Insertion Sort in Python
Is there an error in this question or solution?
