JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Discrete Binary Search Implementation | Reply
I understand the first code given under subtopic Discrete Binary Search , but I am not able to reason as to why always low is going to point to what we want i.e. either first yes or last no ?

I have tried this on examples and this comes out to be true but I am not able to think about it logically.

Some sort of proof using some invariant which is maintained in the loop will be helpful .

Thanks.
RSS