kanwei / algorithms

Ruby algorithms and data structures. C extensions
http://kanwei.github.io/algorithms/
MIT License
2.67k stars 352 forks source link

Add dualpivotquicksort (Dual-Pivot Quicksort) #17

Closed getconor closed 11 years ago

getconor commented 11 years ago

Dual-Pivot Quicksort is a variation of Quicksort by Vladimir Yaroslavskiy.

"This algorithm offers O(n log(n)) performance on many data sets that cause other quicksorts to degrade to quadratic performance, and is typically faster than traditional (one-pivot) Quicksort implementations." -- http://download.oracle.com/javase/7/docs/api/java/util/Arrays.html