Even with the binary search, you still need to iterate after you find your target until you find a defined key.
Not so. Its trivial to adjust binary search to handle "find the node immediately preceding/following my value or the value itself" searches. If you already know one endpoint linear search makes sense, as does using it as the left boundary and range searching the appropriate side.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
In reply to Re: Re: Re: retrieve next avaiable element in sorted hash
by demerphq
in thread retrieve next avaiable element in sorted hash
by vinforget
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |