Binary Tree Maximum Path Sum

IF
AlgoAxiomStaff Engineers
JSTS
Hard20 mins

Given the root of a binary tree, return the maximum path sum of any non-empty path. A path can start and end at any node in the tree.

Source: Tree Depth-First Search pattern — AlgoAxiom
JavaScript
Test Case 1
root = [1, 2, 3]
Test Case 2
root = [1, 2, 3, 4, 5]
Idle