in reply to Setting In-between values in a hash (interpolating)
If you have *lots* of numbers or if you did often, it would be better to use a binary search on a sorted array rather than using a hash.
| dreadpiratepeter's | O(N log N) |
| Best hash | O(N) |
| Best unsorted array | O(N) |
| Binary search (must be sorted) | O(log N) |
Update: Added links.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Setting In-between values in a hash (interpolating)
by dreadpiratepeter (Priest) on Sep 26, 2008 at 21:28 UTC |