LeetCode MEDIUM 1339 Maximum Product of Splitted Binary Tree Summary
Generated by Codex with GPT 5.6 Sol XHigh
Quick facts
- Difficulty:
MEDIUM - Problem: Maximum Product of Splitted Binary Tree
- Topics:
Tree,Depth-First Search,Binary Tree
Problem gist
The input is a binary tree whose nodes contain positive integers. Exactly one edge must be removed, splitting the original tree into two smaller trees. Each smaller tree has a sum, and the goal is to choose the cut that maximizes the product of those two sums. The product must be maximized as an ordinary integer; only the final answer is reduced modulo $10^9 + 7$.
Continue ...