Skip to content

Instantly share code, notes, and snippets.

@patwey
Forked from stevekinney/gist:9e9cfeb225c8133fda73
Last active February 11, 2016 18:49
Show Gist options
  • Save patwey/c5114bb65cc230864aea to your computer and use it in GitHub Desktop.
Save patwey/c5114bb65cc230864aea to your computer and use it in GitHub Desktop.
What are some of the balances and trade offs between different sorting algoritms?
Stability
- stable sorts maintain the relative order of items with equal "values"
- important, obviously, if you value the relative order of your input
- e.g. merge sort, insertion sort
Runtime Analysis
- represents complexity in terms of time (Big-O analysis)
- trade-off: some faster algorithms require more space, so choosing a slower one might make sense where space is limited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment