Sum Root to Leaf Numbers
CodingOnsiteSoftware Engineer, Machine Learning EngineerReported Aug, 2026Medium Frequency
Company question banks are included with the Insider plan.
You are given the root of a binary tree containing digits from 0 to 9 only.
Each root-to-leaf path in the tree represents a number. For example, the root-to-leaf path 1 -> 2 -> 3 represents...