Skip to content

Instantly share code, notes, and snippets.

View jsjohns's full-sized avatar

Josh Johnson jsjohns

View GitHub Profile
@jsjohns
jsjohns / gist:3852798
Created October 8, 2012 14:25 — forked from paullewis/gist:1982121
Mergesort in JavaScript
/**
* An implementation for Mergesort. Less efficient
* than Quicksort. Again, you'd just use Array.sort
* but if you found yourself unable to use that
* there's always this option.
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {