Skip to content

Instantly share code, notes, and snippets.

@rickbacci
Forked from stevekinney/gist:9e9cfeb225c8133fda73
Last active December 7, 2015 06:55
Show Gist options
  • Save rickbacci/511ffe249933e78ce449 to your computer and use it in GitHub Desktop.
Save rickbacci/511ffe249933e78ce449 to your computer and use it in GitHub Desktop.
**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI)
**Step Two**: Fork this gist.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
Insertion sort is quicker, and uses less resources when the data is nearly sorted. Very slow if the data is reverse ordered.
Bubble sort is easy to implement, but very slow, and not stable.
Merge sort is very fast and stable, but requires a larger amount of temp space and arrays from recursive calls.
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment