Algorithms and Data Structures · Middle · Question 5 of 75

What does partitioning do in quicksort?

Explanation

After partitioning the pivot is in its final position, and the two sides are sorted recursively. The sides don't have to be equal in size, which is why the pivot choice matters.

Further reading

Problem with a question

Algorithms and Data Structures · Middle · question 5

Test yourself

Take the Algorithms and Data Structures · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz