Binary search on table element failed
A table has 188 entries but only 184 are occupied and last 4 are blank. A binary search is done (search all) on that table for the element which is on 184th (last) position.
But the search fails and the element on 184th position (last) is not found.
For the same case, when linear search is done (search), the element on 184th position is found.
Do you have any idea what could be the reason that binary search failed.
[b]Question asked by visitor neha gupta[/b]
Re: Binary search on table element failed
Hello,
What language du you use ?
Could you copy a part of your data element structure (ie. working storage definition) and the corresponding search instruction in order to help you.
bye