Which of the following sorting technique was applied for an input array {10,…
2025
Which of the following sorting technique was applied for an input array {10, 5, 16, 2, 8, 9} which gives array {2, 5, 10, 16, 8, 9} after three iterations?
- A.
Bubble sort
- B.
Selection sort
- C.
Insertion sort
- D.
All of the above
Attempted by 163 students.
Show answer & explanation
Correct answer: C
The correct sorting technique is Insertion Sort. It processes elements one by one, inserting each into the sorted portion. After three iterations (processing first four elements), {10,5,16,2} becomes {2,5,10,16}, resulting in {2,5,10,16,8,9}. Bubble sort moves largest elements to the end each iteration, and selection sort places smallest at front. Only insertion sort matches the given intermediate state after three steps.