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

This!

Get your base case right and you're 1/n th of the way there. Get your recursive calls right and you've got the other (n-2)/n th right.

Then you only need to account for the off by one error and you're done.

:)



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

Search: