Design an iterator over a binary search tree with the following rules:
- Elements are visited in ascending order (i.e. an in-order traversal)
hasNext() queries run in O(1) time in average.
For the following binary search tree, in-order traversal by using iterator is
[1, 6, 10, 11, 12]
O(n) space, O(1) has next and next: