Narrowing down the search space


  • 0
    N

    For binary search.
    1 relationship between low and mid, high and mid VS mid selction: round down or round up
    if high = mid, check is there any chance we have "mid = high " in mid selection.
    if low = mid, check is there any change we have "mid = low" in mid selection
    2 two-element array check


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.