Time Complexity Comparison Sheet Of Elementary Sorting Algorithms1 min read
- In Programming
It is always good to sharpen your blade from time to time. Data structures and algorithms is my sword.
Recently, I visited all the elementary sorting algorithms. And it is always fun to understand the complexity and mindset behind it.
This time I thought of writing a small program to run all the algorithms against a variable set of inputs to generate the time complexity chart for it.
And this chart is almost exactly matched with the calculations. So, it also gives verification of the process used to calculate the time complexity of a program.
I won’t take a lot of your time, below is the elementary sorting algorithms time complexity chart.
You can also download the pdf version of the same from here.
Here is the code snippet that is used for generating the above Sorting Comparision chart.
The code is pretty much self-explanatory. But I will try to take out some time to write and talk about the entire code.
Let me know your thoughts on the same.
Do not forget to explore Programming Category.