Consider a numlist = [58, 46, 63, 11, -16, 26]
What will be sequence of following elements after pass 3 of bubble sort?
(A) 46
(B) 26
(C) -16
(D) 11
Consider a numlist = [58, 46, 63, 11, -16, 26]
What will be sequence of following elements after pass 3 of bubble sort?
(A) 46
(B) 26
(C) -16
(D) 11
Solution
✅ Correct Option: 1
Bubble sort (ascending) compares adjacent elements and swaps them if they are out of order. Each pass pushes the largest remaining element to the end.
| Pass | List after the pass |
|---|---|
| Start | 58, 46, 63, 11, -16, 26 |
| 1 | 46, 58, 11, -16, 26, 63 |
| 2 | 46, 11, -16, 26, 58, 63 |
| 3 | 11, -16, 26, 46, 58, 63 |
After pass 3 the elements in the asked order are 11 (D), -16 (C), 26 (B), 46 (A).
Related questions:
2025: 16 May Shift 1
2026: 24 May Shift 1
2025: 13 May Shift 2
2026: 20 May Shift 1