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.
In reply to Re: Sparse Array
by JavaFan
in thread Sparse Array
by rajaguha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |