Maximum sum from leaf to root and path of the maximum sum