There is a big difference between some of the plots, so. So some plots have been separated to clarify, with the existence of the original one that combines all the sorting algorithms in the beginning of each comparison. We compared the time with the input size and then did the same between number of comparisons with the input size.

By referring to the above graphs, we can clearly conclude that there is a relationship between the input size, number of comparisons, and execution time for all the sorting algorithms mentioned (insertion sort, merge sort, heap sort, quick sort) in their worst cases. We can express the relationship as an incremental relationship as the larger the input, the higher the number of comparisons you get, leading to a longer running time
. andAnd as a conclusion, we can consider the number of comparisons as a good predictor of execution time.

The text above was approved for publishing by the original author.

Previous       Next

免费试用

请输入您的信息
请选择修正的语言

请按这里,如果您需要 校对您的简历.

eAngel.me

eAngel.me is a human proofreading service that enables you to correct your texts by live professionals in minutes.