Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Binary Tree Maximum Path Sum

A path is any sequence of connected nodes (it need not pass through the root and each node appears once). Print the maximum sum over all non-empty paths of a binary tree.

Constraints

1 <= number of nodes <= 3 * 10^4 -1000 <= value <= 1000

Discussion

No discussions yet.

Rewards · v2.1

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.