3 ms·
> This important as the price can then form the key of a hash table. Size of the hash table should be the limits of price in your book Assuming I read you righ
by munificent 13y ago
> This important as the price can then form the key of a hash table. Size of the hash table should be the limits of price in your book
Assuming I read you right, I think I would characterize this more as a pigeonhole sort[1] than a hash table.
Which makes sense: the goal here is a sorted collection. And, if you have a known range of values, it's hard to beat a pigeonhole sort for that.
[1] http://en.wikipedia.org/wiki/Pigeonhole_sort http://en.wikipedia.org/wiki/Pigeonhole_sort