Coding
Iterator over a Binary Search Tree
Implement an iterator over a binary search tree.
Input: root = [7,3,15,null,null,9,20], calls: next(), hasNext(), next()
Output: 3, TRUE, 7
Explanation: The iterator yields the smallest value (3), confirms more nodes exist, then properly yields the next in-order value (7).
Was asked at