3 ms·
Could you link to those Project Euler problems, where you have been using this code ?
by l0nwlf 16y ago
Could you link to those Project Euler problems, where you have been using this code ?
- btilly 16y agoLots of project Euler problems have dp solutions. Try http://projecteuler.net/index.php?section=problems&id=215 http://projecteuler.net/index.php?section=problems&id=21... for a fairly easy one, or http://projecteuler.net/index.php?section=problems&id=201 http://projecteuler.net/index.php?section=problems&id=20... for a harder one. Note that many others have dp solutions, but the easiest way to find them is to write a recursive function that you memoize. A good example of that is http://projecteuler.net/index.php?section=problems&id=301 http://projecteuler.net/index.php?section=problems&id=30....