For this one we want to code an iterator that will iterate over the tree in pre-order traversal.
Note that the "starting node" will be the first node visited in "pre-order".
Here are a couple nice writeups:
iterative-preorder-traversal
binary-tree-preorder-traversal-non-recursive-approach
Data Structures And Algorithms (DSA) (Chapter 702 - Binary Search Tree (BST) Concepts)
Chapter 702 - Binary Search Tree (BST) Concepts
Preorder Iterator
Index
Video
Intro
Tree
Node
Operations
Traversal
Balance
Iterators
Design
Pros
Refs
Chapter
Top
Search Site
Contents