quick-sort

Quick sort

quick-sort

Stability: 1 - Experimental

Quick sort.

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

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