Hacker News new | ask | show | jobs
by fgna 658 days ago
Unfortunately the numbers are not circular :( By offsetting the initial number, the binary search does not work optimally right? Imagine the number is below 50, and you start by guessing 60, now you have to search for 30 numbers instead of 25, and thus the binary search is not optimal. reply
1 comments

Ah, yup, you're right. Ballmer's answer of "high or low" isn't in the offset number system, but the normal one, so my strategy doesn't work.

That's what I get for not thinking it through properly, thank you for pointing that out!