Question:

Consider the following sorting algorithms:
(i) Bubble sort
(ii) Insertion sort
(iii) Selection sort
Which ONE among the following choices of sorting algorithms sorts the numbers in the array [4, 3, 2, 1, 5] in increasing order after exactly two passes over the array ?

Updated On: Nov 27, 2024
  • (i) only
  • (iii) only
  • (i) and (iii) only
  • (ii) and (iii) only
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

The correct option is (B) : (iii) only.
Was this answer helpful?
0
1