Depth-first and breadth-first traversals of any tree
Generates a breadth-first traversal sequence for a given tree or graph structure.
Generates a depth-first traversal sequence for a given tree or graph structure.