in reply to Sparse Array
I need an implementation of a sparse array. If the searched key/index does not exist, it needs to return the immediately higher and immediately lower keys/indexes.All binary search trees from data structures 101 will do that. If you keep it balanced, it will do such operations in O(log N) time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sparse Array
by BrowserUk (Patriarch) on Jul 25, 2011 at 15:32 UTC |