Binary Tree Maximum Path Sum refactor