File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 1
1
package com .fishercoder .solutions ;
2
2
3
- /**
4
- * 329. Longest Increasing Path in a Matrix
5
- *
6
- * Given an integer matrix, find the length of the longest increasing path.
7
- * From each cell, you can either move to four directions: left, right, up or down.
8
- * You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed).
9
-
10
- Example 1:
11
-
12
- nums = [
13
- [9,9,4],
14
- [6,6,8],
15
- [2,1,1]
16
- ]
17
- Return 4
18
- The longest increasing path is [1, 2, 6, 9].
19
-
20
- Example 2:
21
-
22
- nums = [
23
- [3,4,5],
24
- [3,2,6],
25
- [2,2,1]
26
- ]
27
- Return 4
28
- The longest increasing path is [3, 4, 5, 6]. Moving diagonally is not allowed.
29
- */
30
-
31
3
public class _329 {
32
4
33
5
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments