Problem 67 of Project Euler feels a lot like cheating, since we have already solved the problem once in Problem 18It is not even that I am clever to have seen the solution works for both problem, it is stated in the problem description which reads Find the maximum total from top to bottom in triangle.tx, a 15K text file containing a triangle with one-hundred rows.However, I thought I would write a short post on it just because otherwise I feel I have a hole in the series. So in Problem 18 I described a solution based on dynamic programming which is the thing we need to use here.

Continue reading...Wednesday, December 29, 2010

problem 18 of Project Euler reads By starting at the top of the triangle below and moving to adjacent numbers on the row below. Find the maximum total from top to bottom of the triangle below.This problem is a classical dynamic programming problem, so in the post I have solved it using both a brute force approach which is more than fast enough for the posed problem, as well as a dynamic programming approach.

Continue reading...
Wednesday, October 26, 2011

10 Comments