Hacker News new | past | comments | ask | show | jobs | submit login

Binary search only works if you suppose the data is well structured. If you perform the search and in the meantime you spot a passing inconsistency, you can interrupt everything and throw an error. But other than that, checking the entire structure negates the entire point of the algorithm



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

Search: