Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi everyone ,

i coundnt write a quicksort with 2 pivots. i selected 2 pivot top of the array. a[0]and a[1] but after i can not sort with these . Can u help me to write with 2 pivots?
Posted

1 solution

Google can help - a quick search for "quicksort with 2 pivots" gave this: http://gdtoolbox.com/DualPivotQuicksort.pdf[^]
It explains the algorithm and gives code in Java - you should be able to re-work that to C in time to hand in your homework!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900