Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brennanholtzclaw/770ce40ae9f61579d66cbcbbe96e2938 to your computer and use it in GitHub Desktop.
Save brennanholtzclaw/770ce40ae9f61579d66cbcbbe96e2938 to your computer and use it in GitHub Desktop.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
I think the main things to consider are the space (memory) that you have, and what is a reasonable amount of time for sorting a set.
When you have a very small set, say less than 100 items, what's the point in caring about how items are getting sorted?
It's when you move into larger and larger sets that you have to start caring about the "Big Oh" of your algorithm.
Honestly, I'm not exactly sure what I'm answering here... Bubble sort is a fine enough sorting a very small dataset, Insertion sort is far better, but still iterates through many many times. And Merge sort is used for a reason. It is super fast, not as many calculations, and handles large sets well. Merge divides up the work quickly and finds a faster way to sort in small pieces before coming back into the whole.
Am I answering this question?
@LouisaBarrett
Copy link

@brennanholtzclaw re: "Am I answering this question?"

This question is to get you thinking critically about different sorting algorithms and when you might choose one over another. Your answer shows you're getting a handle on the different approaches -- to further show your understanding you could have discussed when/why you'd use the different techniques. It's a-ok as is 👍

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