1080. Insufficient Nodes in Root to Leaf Paths
Last updated
Last updated
**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 = [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,-5,null,4,null], limit = -1
**Output:** [1,null,-3,4]