Tap here to switch tabs
Problem
Submissions

Problem: Equal Tree Partition

Try to solve the Equal Tree Partition problem.

Statement

Given the root of a binary tree, return true if removing exactly 11 edge can partition the tree into two non empty trees with equal sums of node values, or false otherwise.

Constraints:

  • The number of nodes in the tree is in the range [1,104][1, 10^4].

  • −105≤-10^5 \leq Node.val ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Equal Tree Partition

Try to solve the Equal Tree Partition problem.

Statement

Given the root of a binary tree, return true if removing exactly 11 edge can partition the tree into two non empty trees with equal sums of node values, or false otherwise.

Constraints:

  • The number of nodes in the tree is in the range [1,104][1, 10^4].

  • −105≤-10^5 \leq Node.val ≤105\leq 10^5