What is the status of list after PASS-3 using Insertion Sort on the List [8,7,13,1,-9,4] ?
What is the status of list after PASS-3 using Insertion Sort on the List [8,7,13,1,-9,4] ?
Solution
✅ Correct Option: 2
Insertion sort takes the next element in turn and inserts it into its correct place in the sorted part on its left. Pass 1 inserts the 2nd element, pass 2 the 3rd, and pass 3 the 4th.
| Pass | Element inserted | List after pass |
|---|---|---|
| 1 | 7 goes before 8 | [7,8,13,1,-9,4] |
| 2 | 13 is already in place | [7,8,13,1,-9,4] |
| 3 | 1 shifts past 13, 8 and 7 | [1,7,8,13,-9,4] |
Option 1: this is the list after Pass 1 (and also after Pass 2, since 13 does not move).
Options 3 and 4: the order of elements does not follow insertion into a sorted left part, because the sorted part must always be in ascending order.
Related questions:
2025: 22 May Shift 1
2026: 26 May Shift 1
2025: 14 May Shift 1