8 ms·
If you know the range of numbers then I'd do a binary search. Get each server to count how many are higher or lower. Play the high low game. When the two totals
by damianknz 10y ago
If you know the range of numbers then I'd do a binary search. Get each server to count how many are higher or lower. Play the high low game.
When the two totals are the same you're done. I think this covers the authors edge cases too. :-)