← ALL NOTES
Array

120. Triangle

Classic path DP over the triangle: the minimum sum to reach cell (i, j) is t[i][j] + min(reach (i-1,j-1), reach (i-1,j)), and the answer is the smallest value in the last row. This submission…

Loading…