i kinda understand quicksort now but one question... if you splitting them in numbers lets say from 0-100 would you put the first split 0-50 and put it on the left and 2nd 51-100 and put it on the right.
Nearly... the first element is the pivot, then the left stack/array is all the items less than the pivot and the right stack/array is all the items greater than the pivot, then you recursively repeat the process.
You can in fact pick any element to be the pivot, but using the first element is just convenient.
wow that was fast.
derstreber2 6 months ago
how much time did it take him?
pithikoulis 11 months ago
i think u are mad and cyco
akhil1987jain 1 year ago
@akhil1987jain -lol, I think you meant "psycho" not "cyco".
danielodors 1 year ago
it reminds me how I worked as a clerk
tramrunner 1 year ago
haha you are awesome
kbae80 1 year ago
I don't think solving P=NP would let you sort in constant time :-/ Because sorting isn't an NP complete problem.
xcoderzach 2 years ago
Nice. What's the song?
j2n 2 years ago
i kinda understand quicksort now but one question... if you splitting them in numbers lets say from 0-100 would you put the first split 0-50 and put it on the left and 2nd 51-100 and put it on the right.
mkadiri05 2 years ago
Nearly... the first element is the pivot, then the left stack/array is all the items less than the pivot and the right stack/array is all the items greater than the pivot, then you recursively repeat the process.
You can in fact pick any element to be the pivot, but using the first element is just convenient.
whipster1000 2 years ago
depends on your pivot.
jomomo 2 years ago
:D nice!!!
DerKoerper1991 2 years ago
This comment has received too many negative votes show
AHHA...try stupidsort LOL
merolleiro 2 years ago
now do it in constant time
bet you cant.
malazt 2 years ago 4
if he could do that he would win 1 million dollars for solving P=NP
notToast 2 years ago
yeah, they should offer more for that.
malazt 2 years ago
very cool
simple yet clear way to help understanding the quicksort
:)
FreakForFreedom 3 years ago
wena urrutia!!
pxixpx8x 3 years ago
I want him to do it with heap sort...
ewanm89 3 years ago 4
muito bom
amarilia2003 3 years ago
NONONO!!! U should have done this with selection sort!!!! Is faster when the cost of a comparation is way smaller than swirling sheets around!!
gurghet 3 years ago
of course its a quick sort... your hands are moving fast... god
VelocityTheory 3 years ago
Sorting papers in O(N log N). What can be bater that this :D
joedebanana 3 years ago
Extremely helpful for CompSci Students trying to figure this stuff out :)
thomasvg1 3 years ago
Surely "list" of graded homeworks ;-)
TvLatte 3 years ago 3
lol very nice now do a mergesort :)
80amnesia 4 years ago 2