Selection Sort MCQs: Solved Questions with Explanations for GATE and Govt Exams
Solve 11 selection sort questions and learn the reasoning behind every answer, from the greedy idea and fixed comparison count to paper traces and code reading.
KnowledgeGate Team
Exam prep & CS education

Selection sort appears often in objective papers because its comparison count, swap count, greedy nature and in-place behaviour all make clean MCQs. Selection sort is relevant to GATE CS aspirants, government CS and IT paper takers, including DSSSB, BPSC, UP Police computer operator and ISRO candidates, as well as placement-test candidates. A fixed set of invariants connects comparisons, swaps, complexity, dry runs and C-code recognition, so one clear mental model answers all 11.
1. Sixty-second refresher: how selection sort actually works
After pass k, the first k positions contain the k smallest elements in final sorted order. In pass i, where i runs from 0 to n-2, the algorithm scans positions i through n-1, finds the minimum and swaps it into position i.
There is at most one swap per pass, so there are at most n-1 swaps. The comparison count is fixed:
(n-1) + (n-2) + ... + 1 = n(n-1)/2
For n = 5, this is 5 x 4 / 2 = 10 comparisons, whatever the input order. The fixed comparison count, limited swaps and placement of the smallest elements explain the answers.

2. Concept MCQs: what selection sort is
Q1. Repeatedly finding the minimum
This question is from TPSC 2025.
Which of the following sorting algorithms is based on the concept of repeatedly finding the minimum element ?
Quick Sort
Selection Sort
Bubble Sort
Merge Sort
Selection sort literally selects the minimum in every pass. Bubble sort compares adjacent pairs, quick sort partitions around a pivot, and merge sort divides and merges.
Practice this question on the platform.
Q2. Match the description
This question is from BELPRO 2025.
Which of the following best describes the working of Selection Sort?
Divide and conquer strategy.
Compare adjacent elements and swap if needed.
Merge smaller subarrays recursively.
Select the smallest element and place it at the beginning.
The second option describes bubble sort, while the first and third point towards merge sort. The final option is the exact selection sort operation.
Practice this question on the platform.
Q3. Design technique
This question is from ISRO 2007 and BEL 2007.
The design technique used by the Selection Sort algorithm is an example of:
Greedy method
Divide-and-conquer
Dynamic Programming
Backtracking
Each pass makes the locally best choice by taking the current minimum, then never revisits that fixed position. This commit-and-never-undo pattern is greedy.
Practice this question on the platform.
3. Advantage MCQs: why anyone still uses it
Q4. The distinguishing advantage
This question is from BPSC 2024.
Which of the following is the biggest advantage of selection sort?
it has low time complexity
it has low space complexity
it requires at most n-1 swaps under any condition
More than one of the above
None of the above
Its time complexity is O(n^2), so the first option is false. O(1) extra space is useful but is shared by other simple sorts. The distinguishing advantage is at most n-1 writes, valuable when writes to storage such as flash memory or EEPROM are expensive. Therefore, “More than one” is a trap.
Q5. Read the offered options
This question is from Goldman Sachs 2023.
What is the advantage of selection sort over other sorting techniques?
It requires no additional storage space
It is scalable
It works best for inputs which are already sorted
It is faster than any other sorting technique
In this option set, in-place O(1) extra storage is the only true advantage. Selection sort is not adaptive, so an already sorted input still takes n(n-1)/2 comparisons. Compare Q4 and Q5 carefully: the correct advantage depends on the choices offered.
Practice this question on the platform.
4. Complexity MCQs: the GATE favourites
Q6. Overall complexity
This question is from DSSSB 2021.
What is the complexity of selection sort algorithms?
O(n)
O(n log2 n)
O(n^2)
O(2n)
Comparisons dominate. Their sum is (n-1) + (n-2) + ... + 1 = n(n-1)/2, which is Theta(n^2). Sortedness changes nothing, so this holds in the best, average and worst cases.
Q7. Tightest upper bound on swaps
This question is associated with GATE 2013. It is also associated with BARC 2013.
Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using selection sort?
O(log n)
O(n)
O(n log n)
O(n^2)
There is at most one swap in each of n-1 passes, so the tightest offered upper bound is O(n). The larger bounds are upper bounds too, but they are not tight.
Practice this question on the platform.
Q8. Worst-case swaps
This question is from GATE 2009.
What is the number of swaps required to sort n elements using selection sort, in the worst case? (A) Theta(n) (B) Theta(n log n) (C) Theta(n^2) (D) Theta(n^2 log n)
Correct: A, Theta(n).
Pair this with Q7. Worst-case swaps are Theta(n), but comparisons are Theta(n^2). Memorise the exact pair: comparisons n(n-1)/2, swaps at most n-1.
Practice this question on the platform.
5. Dry-run MCQs: trace it on paper
Q9. Count the swaps
This question is from UP Police 2023.
How many swaps are needed to sort the array {3, 1, 5, 2, 4} using Selection Sort ?
2
3
4
5
Trace every pass:
Swap 3 and 1:
[1, 3, 5, 2, 4]Swap 3 and 2:
[1, 2, 5, 3, 4]Swap 5 and 3:
[1, 2, 3, 5, 4]Swap 5 and 4:
[1, 2, 3, 4, 5]
All four passes need a swap. Since n = 5 and n-1 = 4, this input reaches the maximum. The trace exactly matches the diagram above.
Practice this question on the platform.
Q10. Stop after the third pass
This question is from DSSSB 2021.
Sort the following list using the selection sort algorithm. H, V, A, T, L, N, K. What is the output of the algorithm after the 3rd pass?
A, V, H, T, L, N, K
A, H, K, T, L, N, V
A, V, T, H, L, N, K
A, T, H, K, L, N, V
Pass 1 chooses A and swaps it with H: A, V, H, T, L, N, K. Pass 2 chooses H and swaps it with V: A, H, V, T, L, N, K. Pass 3 chooses K and swaps it with V: A, H, K, T, L, N, V.
Use the checkpoint trick. After pass 3, the first three entries must be the three smallest letters, A, H and K, in order. That eliminates three options immediately.
Practice this question on the platform.
6. Code-reading MCQ: recognise it in C
Q11. What does the complete loop do?
This question is associated with placement papers from 2024 and 2025. The same code is also associated with CoCubes.
What purpose does the following code serve
int main() {
int array[] = {5, 3, 1, 9, 8, 2, 4, 7};
int size = sizeof(array)/sizeof(array[0]);
int i, j, min_idx, temp;
for (i = 0; i < size-1; i++) {
min_idx = i;
for (j = i+1; j < size; j++) {
if (array[j] < array[min_idx])
min_idx = j;
}
temp = array[min_idx];
array[min_idx] = array[i];
array[i] = temp;
}
}Finds some specific element in the array
Sort the elements of array
Find the smallest element in the array
None of the above
Look for the fingerprint: an outer loop to size-1, a min_idx updated during the inner scan, and one swap after that scan. One outer iteration finds a minimum, but repeating it for every position sorts the array. That is why “Find the smallest element” is the trap.
Practice this question on the platform.
7. The five facts that answer almost every selection sort MCQ
Fact | Value | Used above |
|---|---|---|
Comparisons | Always | Q6 |
Swaps | At most | Q4, Q7, Q8, Q9 |
Design paradigm | Greedy | Q3 |
Extra space |
| Q5 |
Behaviour | Not adaptive and standard array selection sort is not stable | Concept check |
For stability, consider [4a, 4b, 2]. The first pass swaps 4a with 2, producing [2, 4b, 4a]. The equal 4s have changed relative order, so standard array selection sort is not stable.
For a wider view, compare it with other methods in Sorting Algorithms: Complexity and Comparison. GATE aspirants should also keep the response formats straight with MCQ, MSQ or NAT? GATE Question Types Explained.
8. The short version and where to practise next
Selection sort accepts extra comparisons in return for very few writes. Know n(n-1)/2 comparisons and at most n-1 swaps cold, and most objective questions take under a minute.
About 15 Selection Sort questions are available for practice, including 11 with explanations. Descriptive questions also ask for every pass or pseudocode, so practise writing the trace rather than only choosing an option.
For structured DSA practice with PYQs inside the course player, continue with DSA using Java: Placement Preparation Course or DSA Using Python. To browse the wider subject shelf, use Coding & DSA Courses for Placements.
Keep learning

Computer Graphics Applications and Core Components MCQs: 12 Solved Questions with Explanations
Solve 12 published computer graphics questions, then use the explanations and worked calculations to strengthen the distinctions that make each answer clear.

Matrix Chain Order MCQs: 12 Solved GATE and UGC NET Questions with Explanations
Solve Matrix Chain Multiplication questions by applying one cost rule, comparing valid groupings, and filling the dynamic-programming table without arithmetic slips.

Substitution Method MCQs: 12 Solved GATE and ISRO Questions with Explanations
Work through 12 published GATE and ISRO PYQs on subtract-and-conquer, geometric growth, square-root recurrences, recursive code, and asymptotic matching.

Recursion Tree Method MCQs: 12 Solved Questions with Explanations
Solve 12 recursion tree MCQs covering exponential trees, uneven splits, harmonic level sums, square-root arguments, and exact recurrence forms.