Find the maximum path sum in a binary tree.
Check if there exists a root-to-leaf path with given sum.
Find a subarray with a given sum in an array of positive integers.