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

The overflow thing would be about computing the median of some sub-range of a sorted array. It is an often-quizzed thing that comes up as an edge case in binary search of a large array, but could apply to anything where you need to select the middle element of a sub-range of an array and the sum of the start/end indices could overflow.

I think the lore is that it was a bug in Java?'s binary search lib decades ago?



Indeed: https://research.google/blog/extra-extra-read-all-about-it-n...

P.S. I can’t believe this happened over 20 years ago, I must be old.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: