I need to guess a number. I can only see if the number I\'m proposing is lower or higher. Performance matters a whole lot, so I thought of the following algorithm:
Le
A standard binary search between 0 and N(N is the given number) will give you the answer in logN time.