X
xandra
i have 2 question in breadth-first traversal.your help will be
appreciated.
1. what is the purpose of the queue in breath-first traversal?
2 suppose you had a function call displayAtDepthN which when given a tree
and depth would display only the nodes at that depth. explain how this
could be used to give a breadth-first traversal of the tree,and why it
would not be as efficient as one using a queue.
appreciated.
1. what is the purpose of the queue in breath-first traversal?
2 suppose you had a function call displayAtDepthN which when given a tree
and depth would display only the nodes at that depth. explain how this
could be used to give a breadth-first traversal of the tree,and why it
would not be as efficient as one using a queue.