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

I'm being nitpicky, but the iterative and "dynamic programming" solution are both dynamic programming if you follow the strict definition.

Both are exploiting optimal substructure and the recursive nature of the problem. The best solution, labeled as "dynamic programming" in this article is actually just the most well optimized dp solution.




While we're at it, the last one could work purely in-place.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: