Anonymous user
Sorting algorithms/Counting sort: Difference between revisions
Sorting algorithms/Counting sort (view source)
Revision as of 23:03, 19 December 2009
, 14 years ago2^32 = 4Gbytes, not 16.
m (2^32 = 4Gbytes, not 16.) |
|||
Line 22:
The ''min'' and ''max'' can be computed apart, or be known ''a priori''.
'''Note''': we know that, given an array of integers, its maximum and minimum values can be always found; but if we imagine the worst case for an array of 32 bit integers, we see that in order to hold the counts, we need an array of 2<sup>32</sup> elements, i.e., we need, to hold a count value up to 2<sup>32</sup>-1, more or less
=={{header|Ada}}==
|