1

This link is the image to the graph comparing the sorting algorithms and I am a bit confused as to how I could interpret it/compare the different algorithms into words.

https://i.sstatic.net/zAQwV.png

1 Answer 1

5

The x-axis represents the size of the list that's being sorted, and the y-axis the amount of time it took to sort that list. Each line corresponds to a sorting algorithm.

In terms of interpretation, you can see for example that for small list sizes, quicksort is the slowest sorting method. When you make the size bigger, it becomes relatively faster than a lot of the other methods.

This difference is because quicksort has a larger "overhead" (the amount of time you need regardless of the list size) than most of the methods, but a better algorithmic complexity (the way the time scales with increasing list sizes when the size is already large). The algorithmic complexity can be measured by looking at the slope of the lines for large list sizes, because this is a log-log plot.

Timsort is better than the other methods for all list sizes because it's designed to pick different methods depending on specifics of the list.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.