Results 1 to 2 of 2

Thread: Binary search on table element failed

  1. #1
    Geek_Guest
    Guest

    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.

    Question asked by visitor neha gupta


  2. #2
    Junior Member
    Join Date
    Dec 2007
    Answers
    4

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact