Breadth-first Traversal

In breadth-first traversal, we traverse the binary search tree from left to right. (Reading time: under 5 minutes)

We'll cover the following...

With breadth-first traversal, we first traverse through one level of children nodes, then through one level of grandchildren nodes, then through one level of grand-grandchildren nodes, etc. In the above tree, the numbers show the sequence in which the nodes will be traversed, not the data! With breadth-first search, we can’t use a stack like we could with depth-first search: when we go from node 1 to node 2, node 2 doesn’t have any connection ...