Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use DFS (Depth First Search) to traverse the tree, and constantly keep track of the current path maximum.
Solve with full IDE support and test cases