Binary Tree Consecutive Sequence II
Binary Tree Consecutive Sequence II (Backtracking Solution) Given a binary tree, find the longest consecutive sequence in the binary tree. Note that it can be any direction, rather than only from parent to child as in its previous problem. The idea is to use backtracking. Brush up on backtracking. It it recursion which does recursion […]