Question discussion

What is the condition for binary search to be unsuccessful where Beg is the beginning and End is ending location of sorted array?

359816Medium DSSSB TGT Computer Science 0 replies 0 views
0

What is the condition for binary search to be unsuccessful where Beg is the beginning and End is ending location of sorted array?

  • AEnd > Beg
  • BEnd != Beg
  • CEnd < Beg
  • DEnd == Beg
Correct answer: C

Explanation

A binary search is unsuccessful when the search range becomes empty, which happens when End < Beg.

Discussion 0

Nobody has replied yet. Start the discussion!