Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Project Euler

Name: Anonymous 2011-12-29 17:50

Hi /prog/,
I'm currently improving my fairly rudimentary programming skills by doing Project Euler exercises.
Problem 18 (http://projecteuler.net/problem=18) had me stuck for a while today, and now that I've solved it, I still can't help but feel that my way of doing it is awfully odd.
Here's a link to my solution: http://pastebin.com/YX4kW3dA
How would you have solved this problem?

Name: Anonymous 2011-12-29 19:00

you guyes could use dynamic programming to make it more efficient. Compute the best paths, starting from the bottom of the triangle, and then working your way up.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List