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
פשוט גש לתיבת האימייל שלך, ולחץ על הלינק לאימות, ומייד נתקן עבורך את האיימייל. אם אתה רוצה לתקן עוד אימיילים אז:
או