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

It's easier than you might think. Only read this comment as far as you need to make a little more progress. These hints only apply if you're starting with a dynamic programming approach. Also, they're only helpful if you do the work, so I don't think they violate the spirit of Project Euler.

Is your dynamic programming table 2D? Maybe it should be.

Stop reading if that's progress.

Have you looked closely at the table content?

Stop reading.

Have you noticed how similar many parts are, under perhaps simple transforms?

Stop reading.

Try adding or subtracting your coordinates, to see more of the pattern.

Stop reading.

There's not just a within-row pattern.

Stop reading.

In the end, dynamic programming might not be the main trick. But you can make your own way from here.



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

Search: