Given a binary tree where every node holds a single digit (0-9), each root-to-leaf path spells a number (root digit is most significant). Return the total sum of all such numbers. The tree is given as a level-order array with null for missing children.
Input: A level-order array of the tree (digit values).
Output: Integer — the sum of all root-to-leaf numbers.
Input: [1,2,3]
Output: 25
Explanation: 12 + 13 = 25.Input: [4,9,0,5,1]
Output: 1026
Explanation: 495 + 491 + 40 = 1026.Input: [1]
Output: 1
Explanation: Single digit.1<=nodes<=10^40<=value<=9