Medium
077Binary Search Tree Iterator
Given a BST encoded as level-order with -100000 as null, return all next() values from a BST iterator.
EXAMPLES
Example 1
Input
{
"root": [
7,
3,
15,
-100000,
-100000,
9,
20
]
}
Output
[
3,
7,
9,
15,
20
]FUNCTION SHAPE
root: intArray→intArray