Given a binary tree root and an integer limit, delete all insufficient nodes simultaneously and return the new root.
A node is insufficient if every root→leaf path that goes through it has total sum strictly less than limit.
A leaf has no children.
Input: root = [5,4,8,11,null,17,4,7,1,null,null,5,3], limit = 22
Output: [5,4,8,11,null,17,4,7,null,null,null,5]
Input: root = [1,2,3,4,-99,-99,7,8,9,-99,-99,12,13,-99,14], limit = 1
Output: [1,2,3,4,null,null,7,8,9,null,14]
Input: root = [1,2,-3,-5,null,4,null], limit = -1 Output: [1,null,-3,4]
Output: [1,null,-3,4]
Accepted:
Submission: