This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I’ve been looking into number triangles and noticed there are several algorithms that can be used to work out the maximum sum path of the triangle using dynamic programming.
One such article:https://www.geeksforgeeks.org/maximum-path-sum-triangle/amp/
All the algorithms seem to print out only the final sum. I’m curious if there is a way to keep track of the addends that make up that final sum? I tried coding something up out of curiosity but found that when I tried to keep track of the used addends, the time complexity became horrendous (something like 2n)
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/algorithms/...