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
Do you know the range of possible values? If yes, always start in the middle and do exactly what you describe.