← Quiz: Merge Sort and Quick Sort: all 13 questions
Quiz: Merge Sort and Quick Sort · Question 13 of 13
What does quickselect do differently from quick sort?
What does quickselect do differently from quick sort?
- A.It sorts both sides after partitioning
- B.It uses merging instead of partitioning
- C.It always takes O(n log n)
- D.After partitioning, it continues only into the side that contains the k-th position
Answer & explanation
Correct answer: After partitioning, it continues only into the side that contains the k-th position
Skipping the other side is why it finds the k-th smallest in O(n) on average.
Can you get the rest right without peeking?
Take the timed Quiz: Merge Sort and Quick Sort quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →