root of a binary tree, return the maximum path sum of any non-empty path.
Two key insights:
Negative gains are discarded — if a subtree has a negative contribution, we simply don't include it (clamp to 0).
The path through a node uses both left and right (L + node + R) — this is the candidate for global max. But we can only return one direction to the parent (a path can't fork). The global variable captures the best full path independently of what's returned upward.