every programmer's gut reaction to binary search is "that's easy!"
Perhaps I'm not a programmer then. Or I'm a strange one I guess.
I tend to approach every programming problem assuming the worst: This will be much harder than it seems. There will be corner-cases. I will miss some of them and do the wrong thing for other ones. I should try to enumerate every weird condition I can think of, and then throw random inputs at things to catch the stuff I missed.
Sounds like I'm not a programmer, either. Working on the Programming Team for my school for many years taught me to consider edge-cases.
And personally, there's quite frequently SOMETHING I forget when writing a binary search, and it usually ends in it infinite looping -- so, I often have to go find my stupid mistake.
Perhaps I'm not a programmer then. Or I'm a strange one I guess.
I tend to approach every programming problem assuming the worst: This will be much harder than it seems. There will be corner-cases. I will miss some of them and do the wrong thing for other ones. I should try to enumerate every weird condition I can think of, and then throw random inputs at things to catch the stuff I missed.