Can somebody please suggest me when would I need a Level-Order Traversal (to solve some practical/real-life scenario)?
Can somebody please suggest me when would I need a Level-Order Traversal (to solve
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Level order traversal is actually a Breadth First Search, which is not recursive by nature.
From: http://en.wikipedia.org/wiki/Breadth-first_search
Breadth-first search can be used to solve many problems in graph theory, for example:
sorted order, allows the tree to be re-constructed in an efficient
manner.