Quick sort.
JavaScript
Latest commit f40fc64 Jul 22, 2013 @tristanls 0.2.1
Permalink
Failed to load latest commit information.
scripts Initial commit Jul 22, 2013
.gitignore Initial commit Jul 22, 2013
LICENSE Initial commit Jul 22, 2013
README.md Implemented randomized partitioning option Jul 22, 2013
index.js Implemented randomized partitioning option Jul 22, 2013
package.json 0.2.1 Jul 22, 2013
test.js clearer test reporting Jul 22, 2013

README.md

quick-sort

Stability: 1 - Experimental

Quick sort.

Usage

var quickSort = require('quick-sort');
...
var ascending  = quickSort(array);                              // sort ascending
var descending = quickSort(array, undefined, undefined, false); // sort descending
// sort ascending using randomized partitioning
var ascending  = quickSort(array, undefined, undefined, true, true);  
// sort descending using randomized partitioning
var descending = quickSort(array, undefined, undefined, false, true); 

yes, the descending case is sort of crappy usage, I doubt anyone will use this code though :)