Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, it's a simple enough algorithm to be a good basic exercise---most people come up with binary search on their own spontaneously when looking a word up in dictionary.

Property based testing is really useful for finding corner cases in your binary search. See eg https://fsharpforfunandprofit.com/series/property-based-test... for one introduction.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: