Given a sorted integer array nums representing a binary tree with depth less than
The tree is represented by an array of three digit integers where each integer encodes a node:
The hundreds digit represents the depth
The tens digit represents the position
The units digit represents the value
For a node at depth
Its left child is located at depth
Its right child is located at depth
A leaf is a node with no children. A root to leaf path sum is the sum of all node values along a path from the root node to a leaf node.
Constraints:
nums.length
nums[i]
nums represents a valid binary tree with depth less than
nums is sorted in ascending order.
Given a sorted integer array nums representing a binary tree with depth less than
The tree is represented by an array of three digit integers where each integer encodes a node:
The hundreds digit represents the depth
The tens digit represents the position
The units digit represents the value
For a node at depth
Its left child is located at depth
Its right child is located at depth
A leaf is a node with no children. A root to leaf path sum is the sum of all node values along a path from the root node to a leaf node.
Constraints:
nums.length
nums[i]
nums represents a valid binary tree with depth less than
nums is sorted in ascending order.