Each time we keep pushing the left children into the stack until we reach a null node. Then the top node will always have the mininun value. It's kind of like the in-order traveral, except that we ...
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next will return the next smallest number in the BST. next and hasNext ...