Counting Sort: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


<font color=darkgray>The counting sort algorithm assuming that the input keys are in the set {0, 1, ..., k} sorts n keys in Θ(k + n) time.<font>
<font color=darkgray>The counting sort algorithm assuming that the input keys are in the set {0, 1, ..., k} sorts n keys in Θ(k + n) time.<font>
{|
| [[Algorithm_Complexity#Worst-case_Running_Time|Worst-case time]] || Θ(k + n)
|-
|  [[Algorithm_Complexity#Average-case_Running_Time|Average-case time]] || Θ(k + n)
|-
| [[Algorithm_Complexity#Best-case_Running_Time|Best-case time]] ||
|}

Revision as of 00:56, 10 August 2018

Internal

Overview

The counting sort algorithm assuming that the input keys are in the set {0, 1, ..., k} sorts n keys in Θ(k + n) time.

Worst-case time Θ(k + n)
Average-case time Θ(k + n)
Best-case time