Hacker News new | ask | show | jobs
by aqme28 376 days ago
Pretty cool! Obviously the best strategy is binary search, but it's pretty hard to figure out the best choice for that on the fly.
2 comments

That's basically what I did. Drilled down in a binary-search fashion, guessing "captive" in 18 tries. (Doing it programmatically would have been even faster, of course, but then what is the fun of that? The manual approach yielded a fairly optimal performance anyway.)
> binary search

Hence the word "Mid".