Find the diameter (longest path) of a binary tree.
Find the maximum path sum in a binary tree.
Check if there exists a root-to-leaf path with given sum.