0 votes 0 votes Consider the following sorting algorithms:Bubble sortInsertion sortSelection sortWhich 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?$\text{(i)}$ only$\text{(iii)}$ only$\text{(i)}$ and $\text{(iii)}$ only$\text{(ii)}$ and $\text{(iii)}$ only Algorithms gate-ds-ai-2024 algorithms sorting + – Arjun asked Feb 16 • edited Mar 20 by makhdoom ghaya Arjun 1.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Bubble sort needs 3. Insertion sort wastes 1 to assume first element as sorted. Selection sort does it in 2 with first pass swap [4, 1] and second pass swap [3, 2]. So B. ikka answered May 16 ikka comment Share Follow See all 0 reply Please log in or register to add a comment.