Let's dig into another depth-first search strategy: inorder! This time, we walk through a numerical example, traversing the tree with fresh, animated voices and a broken washing machine.
We dive into depth-first search by exploring our first of three strategies: preorder! Let's walk through an example step-by-step and get to know members of Saron's fictitious tree family along the way.
If you've heard of binary trees, you've probably heard of binary search. But how does a binary search algorithm actually work? And do you have to have binary trees, or can you use it on other things?