← Quiz: Merge Sort and Quick Sort: all 13 questions
Quiz: Merge Sort and Quick Sort · Question 4 of 13
After a partition step of quick sort, what is guaranteed about the pivot?
After a partition step of quick sort, what is guaranteed about the pivot?
- A.It is the median of the array
- B.It is in its final sorted position
- C.It has moved to index 0
- D.It is the smallest value
Answer & explanation
Correct answer: It is in its final sorted position
Everything left of it is smaller and everything right is larger or equal, so it never moves again.
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 →