Consider the 'numList' having the elements as follows:
numList =[9,8,12,1,-8,3].
What will be the partially sorted list after three complete passes of Bubble sort?
Consider the 'numList' having the elements as follows:
numList =[9,8,12,1,-8,3].
What will be the partially sorted list after three complete passes of Bubble sort?
Solution
✅ Correct Option: 1
Bubble sort compares adjacent elements from the left and swaps them if the left one is larger. Each pass pushes the largest remaining element to the end.
| Pass | List after the pass |
|---|---|
| Start | [9, 8, 12, 1, -8, 3] |
| 1 | [8, 9, 1, -8, 3, 12] |
| 2 | [8, 1, -8, 3, 9, 12] |
| 3 | [1, -8, 3, 8, 9, 12] |
Option 4: this is the list after only two passes.
Options 2 and 3: they show more sorting than three passes can produce. Bubble sort moves a small element left by only one place per pass, so -8 cannot get ahead of 1 and 3 by this point.
Related questions:
2026: 13 May Shift 2
2026: 20 May Shift 1
2026: 23 May Shift 1
2025: 15 May Shift 2