What will be status of the array [8, 7, 13, 1, -9, 4], after the third pass of Bubble sort?
What will be status of the array [8, 7, 13, 1, -9, 4], after the third pass of Bubble sort?
Solution
✅ Correct Option: 3
Bubble sort (ascending) compares adjacent elements and swaps them if they are out of order. After each pass, the largest remaining element settles at the end.
| Pass | Swaps made | Array after pass |
|---|---|---|
| 1 | ; ; ; | |
| 2 | ; ; | |
| 3 | ; ; |
Option 1: this is the array after the first pass, not the third.
Option 2: this is the original, unsorted array.
Related questions:
2026: 20 May Shift 1
2025: 16 May Shift 1
2025: 20 May Shift 1
2025: 22 May Shift 1