0

bool search(int value, int values[], int n) { int middle=(int)((n-1)/2); if(n<0) { return false; } else if(values[middle]==value) { return true; } else if(value

1
  • I figured it.I should only increase / decrease right or left at a time.
    – qwerty
    Commented Oct 23, 2016 at 14:52

1 Answer 1

0

I figured it.I should only increase / decrease right or left at a time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .