Skip to content

Commit f3472c1

Browse files
refactor 1289
1 parent 732440f commit f3472c1

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_1289.java

-21
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1289. Minimum Falling Path Sum II
5-
*
6-
* Given a square grid of integers arr, a falling path with non-zero shifts is a
7-
* choice of exactly one element from each row of arr, such that no two elements chosen in adjacent rows are in the same column.
8-
* Return the minimum sum of a falling path with non-zero shifts.
9-
*
10-
* Example 1:
11-
* Input: arr = [[1,2,3],[4,5,6],[7,8,9]]
12-
* Output: 13
13-
* Explanation:
14-
* The possible falling paths are:
15-
* [1,5,9], [1,5,7], [1,6,7], [1,6,8],
16-
* [2,4,8], [2,4,9], [2,6,7], [2,6,8],
17-
* [3,4,8], [3,4,9], [3,5,7], [3,5,9]
18-
* The falling path with the smallest sum is [1,5,7], so the answer is 13.
19-
*
20-
* Constraints:
21-
* 1 <= arr.length == arr[i].length <= 200
22-
* -99 <= arr[i][j] <= 99
23-
* */
243
public class _1289 {
254
public static class Solution1 {
265
public int minFallingPathSum(int[][] arr) {

0 commit comments

Comments
 (0)