Problem 1339 · Medium

Maximum Product of Splitted Binary Tree

Cut one edge to split the tree, using subtree sums from a single bottom-up pass to maximize the product of the two parts.

Open the interactive visualisation