← Quiz: Searching and Sorting in C: all 10 questions
Quiz: Searching and Sorting in C · Question 4 of 10
Which sort makes the same number of comparisons whether the input is sorted or not?
Which sort makes the same number of comparisons whether the input is sorted or not?
- A.Bubble sort with a swap flag
- B.Insertion sort
- C.Selection sort
- D.None of them
Answer & explanation
Correct answer: Selection sort
Selection sort always scans the whole unsorted part to find the minimum.
Can you get the rest right without peeking?
Take the timed Quiz: Searching and Sorting in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →