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

You don't have to assume that. We can take each randomly oriented noodle and orient it correctly in O(1) as a preprocessing step. Since the complexity would be additive, the overall complexity remains O(N).


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

Search: