Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tman22/c57d6969a19d2c5b9ac583e59228e404 to your computer and use it in GitHub Desktop.
Save Tman22/c57d6969a19d2c5b9ac583e59228e404 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?"
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.
@Tman22
Copy link
Author

Tman22 commented May 20, 2016

Time and Space are the two things to think about!
This is some CS mojo:

Bubble Sort & Insertion Sort O(n2) are both fairly slow but will take up minimal space! This could be good if you don't have the space and don't care about the time. Although large chunks of data might not be the best option for these types.

Merge Sort O(n log n) is super fast but takes up large amounts of space due to its recursive nature. Saying that if you don't care about the space use merge sort. Space is cheap, get it done fast ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment