Skip to content

Conversation

SandersLin
Copy link
Contributor

The problem was a beautiful demonstration of the power of dynamic programming. By memorizing the best path at each layer the running time was cut down from exponential to linear.
From project Euler website:

NOTE: As there are only 16384 routes, it is possible to solve this problem by trying every route. However, Problem 67, is the same challenge with a triangle containing one-hundred rows; it cannot be solved by brute force, and requires a clever method! ;o)

@SandersLin SandersLin changed the title added solution to project Euler problem 18 using dynamic programming added solution to project Euler problem 18 and 67 using dynamic programming Dec 7, 2018
Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, but I guess you've added a wrong problem_18/sol1.py? Could you kindly upload a correct one?

@github-actions
Copy link

github-actions bot commented Dec 9, 2019

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants