Given the root of a binary tree and an integer limit, delete all insufficient nodes from the tree and return the root of the resulting binary tree.
A node is considered insufficient if every root to leaf path passing through that node has a sum strictly less than limit.
A leaf is a node with no children.
Constraints:
The number of nodes in the tree is in the range
Node.val
limit
Given the root of a binary tree and an integer limit, delete all insufficient nodes from the tree and return the root of the resulting binary tree.
A node is considered insufficient if every root to leaf path passing through that node has a sum strictly less than limit.
A leaf is a node with no children.
Constraints:
The number of nodes in the tree is in the range
Node.val
limit