To be fair, binary search is pretty simple. It's not like he was asked to code max-flow (e.g. Ford-Fulkerson) off the top of his head.
The problem I'm sure, was being rusty at C, not the algorithm implementation. I make all kinds of silly mistakes on the whiteboard if it's with a language I haven't used for a while.
The problem I'm sure, was being rusty at C, not the algorithm implementation. I make all kinds of silly mistakes on the whiteboard if it's with a language I haven't used for a while.