Minimum Falling Path Sum
Given an n x n matrix, return the minimum sum of any falling path through the matrix. A falling path starts at any element in the first row and chooses the element in the next row that is either directly below or diagonally left/right.
Minimum Falling Path Sum

Given an n x n matrix, return the minimum sum of any falling path through the matrix. A falling path starts at any element in the first row and chooses the element in the next row that is either directly below or diagonally left/right.

Example 1:
Input: [[2,1,3],[6,5,4],[7,8,9]]
Output: 13
Input
arr =[[2,1,3],[6,5,4],[7,8,9]]

Initialize DP with first row values

Input Matrix
2
1
3
6
5
4
7
8
9
DP Table (Min Path Sum)
2
1
3
6
5
4
7
8
9
Variables
No variables to display
DepthFunction Call
Stack empty
0/7