298. Binary Tree Longest Consecutive Sequence
Input:
1
\
3
/ \
2 4
\
5
Output: 3
Explanation: Longest consecutive sequence path is 3-4-5, so return 3.Input:
2
\
3
/
2
/
1
Output: 2
Explanation: Longest consecutive sequence path is 2-3, not 3-2-1, so return 2.Last updated