Most Profitable Path in a Tree | Leetcode 2467