Counting sort complexity [closes #11]

This commit is contained in:
Antti H S Laaksonen 2017-02-25 12:47:24 +02:00
parent b0ca108f16
commit 1c63dec8d0
1 changed files with 1 additions and 2 deletions

View File

@ -538,8 +538,7 @@ but use some other information.
An example of such an algorithm is An example of such an algorithm is
\key{counting sort} that sorts an array in \key{counting sort} that sorts an array in
$O(n)$ time assuming that every element in the array $O(n)$ time assuming that every element in the array
is an integer between $0 \ldots c$ where $c$ is an integer between $0 \ldots c$ and $c=O(n)$.
is a small constant.
The algorithm creates a \emph{bookkeeping} array The algorithm creates a \emph{bookkeeping} array
whose indices are elements in the original array. whose indices are elements in the original array.