GATE 2024 Data Science and Artificial Intelligence question: Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii)…
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?
Show answer
Official answer: B