We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9640a3 commit 2572788Copy full SHA for 2572788
src/main/java/com/fishercoder/solutions/_298.java
@@ -2,31 +2,6 @@
2
3
import com.fishercoder.common.classes.TreeNode;
4
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
24
- /
25
26
27
-1
28
- Longest consecutive sequence path is 2-3,not3-2-1, so return 2.
29
- */
30
public class _298 {
31
32
public static class Solution1 {
0 commit comments