1. problem
- an unbalanced binary tree,
- find out maximum path.
2. init
# Definition for a binary tree node. |
3. thought
- if node is null, return 0
- check root’s left/right
- return 1 + max of Left/right node
4. trouble
each node do their job.
5.final solution
# Definition for a binary tree node. |