Given a binary tree, a node is aligned if its value equals its depth. Return the longest path consisting only of aligned nodes.
node
0
0
1
1
1
2
2
3
4
5
2
6
tree=Array(7)
Step 1 / 3
Step 1:
Compute aligned chains bottom-up while tracking a global maximum.
Pointers: node=0
Focus: select @ [0]