Skip to content
Quick sort.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
scripts
.gitignore
LICENSE
README.md
index.js
package.json
test.js

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 :)

Something went wrong with that request. Please try again.