What is the average case running time of an insertion sort algorithm?
Tuesday, January 03, 2023
Add Comment
Question: What is the average case running time of an insertion sort algorithm?
The average case running time of an insertion sort algorithm is O(n^2). This means that, when sorting a collection of n items, the time complexity of the algorithm is proportional to n squared. This means that, as the number of items increases, the time complexity increases exponentially. In other words, it will take longer to sort larger collections of items than it will to sort smaller collections of items.
0 Komentar
Post a Comment