Quick sort question
How do i do this? im not sure how to organise the values from the 31 pivot. I know smaller values go on the left and larger on the right but in what order?
10 Replies
hi
heya
You are asking about qsort? or normal sort?
It says quicksort in the picture
You need to understand the partition scheme being used to answer the question. Which presumably is included in the description of the algorithm.
oh there isnt an algorithm for this question, just this as shown
Quicksort is the algorithm.
it shows blank spaces left and right of the 31
oh, yeah
i dont understand in what order i need to order the lower values on the left and higher values on the right ;-;
There are a few different ways to implement quicksort, you might want to read up on it again to be able to answer the question:
https://en.wikipedia.org/wiki/Quicksort
Quicksort
Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961. It is still a commonly used algorithm for sorting. Overall, it is slightly faster than merge sort and heapsort for randomized data, particularly on larger distributions.Quicksort is a divid...
ill have a look ty
It's just the order that you find those values in. Nothing special