How many comparisons are required to sort the list [8,7,6,5,4] using bubble sort?
How many comparisons are required to sort the list [8,7,6,5,4] using bubble sort?
Solution
✅ Correct Option: 2
Bubble sort makes comparisons in the first pass, in the second, and so on down to 1. The total is .
For , the passes make comparisons.
The list is in reverse order, so every pass still swaps elements and no pass can be skipped.
Related questions:
2026: 23 May Shift 1
2026: 11 May Shift 2
2026: 31 May Shift 1
2026: 29 May Shift 1