Time & Space Complexity of Counting Sort

In this article, we have explained the time complexity of Counting Sort for Average case, Worst case and Best case and also, covered the space complexity using Mathematical analysis.

Table of contents:

Introduction to Counting SortTime Complexity analysisWorst case time complexityBest case time complexityAverage case time complexitySpace ComplexityConclusion on time and space complexityComparison with other sorting algorithms

In short,

Time complexity: O(N+K)Space Complexity: O(K)Wor...
 •  0 comments  •  flag
Share on Twitter
Published on June 10, 2021 02:09
No comments have been added yet.