In which type of tree traversal would all nodes at a particular level below the root be traversed before those at lower levels?
Given a tree such as this:
1
/ \
2 3 4
/ \ / \ \
5 6 7 8 9
a traversal of nodes in 1-2-3-4-5 order would be a breadth-first traversal.
Geen opmerkingen:
Een reactie posten