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

Yup. I updated my comment with working code. Just figure out the small case, and extrapolate once you find a match.



Nice approach!

It's O(1) to find a candidate solution, but of course it will still be O(N) to verify that the solution really works.




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

Search: