i have questions 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.
and i have another question regarding the o-notation.
how does using strings insted of simple types like integers alter the
o-notation of operations.
thank you for your help
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.
and i have another question regarding the o-notation.
how does using strings insted of simple types like integers alter the
o-notation of operations.
thank you for your help