Down the Triangle — Solution & Editorial
Fold bottom-up: dp over the last row, each level replacing dp[j] with row[j] + min(dp[j], dp[j+1]).
Complexity: O(N2)
Fold bottom-up: dp over the last row, each level replacing dp[j] with row[j] + min(dp[j], dp[j+1]).
Complexity: O(N2)