How many passes are required to sort a list of 6 elements using bubble sort?
How many passes are required to sort a list of 6 elements using bubble sort?
Solution
✅ Correct Option: 1
Each pass of bubble sort places the largest remaining element at its final position at the end of the list. After passes, the last remaining element is automatically in place, so no separate pass is needed for it.
For :
The passes are the worst case. With a swap flag, the sort can stop earlier if a pass makes no swaps.
Related questions:
2026: 11 May Shift 2
2025: 13 May Shift 2
2026: 21 May Shift 1
2026: 29 May Shift 2