Skip to content

Instantly share code, notes, and snippets.

@sspExps
sspExps / gist:c2c7e2633792eb107009de8c30f2c3fa
Created April 28, 2016 21:10 — forked from paullewis/gist:1981455
Quicksort in JavaScript
/**
* An implementation for Quicksort. Doesn't
* perform as well as the native Array.sort
* and also runs the risk of a stack overflow
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {
* array.push(Math.round(Math.random() * 100));