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

The C++ standard library phrases binary search as a partitioning problem - finding the index where a predicate goes from false to true, which is helpful for me.


Recalling the subtle difference between std::lower_bound and std::upper_bound and where it matters is somewhat annoying before it becomes muscle memory.




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

Search: