educative.io

Breadth First Search Reading Sequence

In the example BST given in the section, how does 30 get added to the queue after 11 when the tree is being read if there is no link between 11 and 30?

In breadth-first traversal, we traverse through one complete level of children nodes before moving on to the next level of grandchildren nodes. In this example, when 15 gets popped off the queue, it’s children 11 and 30 are pushed to the queue. When 11 is popped off, its children 7 and 13 are pushed to the queue.