Added the procedure to traverse tree nodes using breadth-first strategy.