Consider the given array:
[15,10,12,11]
What will be the position of the following elements in the array after the first pass using the selection sort?
A. 15
B. 10
C. 12
D. 11
Consider the given array:
[15,10,12,11]
What will be the position of the following elements in the array after the first pass using the selection sort?
A. 15
B. 10
C. 12
D. 11
Solution
✅ Correct Option: 3
In the first pass of selection sort, the smallest element of the whole array is found and swapped with the element at the first position. Nothing else is moved.
The smallest element is , at index 1. Swapping it with at index 0 gives .
So the positions from first to last are (B), (A), (C), (D).
Option 1: this would need and to swap as well, but selection sort makes only one swap per pass, so they stay in their original order.
Related questions:
2026: 23 May Shift 2
2026: 20 May Shift 1
2026: 11 May Shift 2