Question:
Given a binary tree, find the length of the longest consecutive sequence path.
The path refers to any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The longest consecutive path need to be from parent to child (cannot be the reverse).
Explanation:
递归。想清楚base case和递归的模式即可。左右值,以及当前值,不要混淆。