AlgoMaster Logo

Binary Search Tree Iterator

tree=[7, 3, 15, null, null, 9, 20]
0 / 29
7315920BSTIteratorstackoutputlazy inorder: stack = path to the next smallest
algomaster.io
Step:Start: the stack lazily holds the path to the next smallest value