Skip to content

Commit 2572788

Browse files
refactor 298
1 parent a9640a3 commit 2572788

File tree

1 file changed

+0
-25
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-25
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@
22

33
import com.fishercoder.common.classes.TreeNode;
44

5-
/**
6-
* Given a binary tree, find the length of the longest consecutive sequence path.
7-
8-
The path refers to any sequence of nodes from some starting node to any node in the tree along the parent-child connections.
9-
The longest consecutive path need to be from parent to child (cannot be the reverse).
10-
11-
For example,
12-
1
13-
\
14-
3
15-
/ \
16-
2 4
17-
\
18-
5
19-
Longest consecutive sequence path is 3-4-5, so return 3.
20-
21-
2
22-
\
23-
3
24-
/
25-
2
26-
/
27-
1
28-
Longest consecutive sequence path is 2-3,not3-2-1, so return 2.
29-
*/
305
public class _298 {
316

327
public static class Solution1 {

0 commit comments

Comments
 (0)