Q:

what is common applications for level-order traversal in binary tree?

I know some of the applications for preorder, postorder, and inorder traversal. But I did not know any applications for lever-order traversal. Could someone give me a simple application for lever-order traversal and describe it a bit?

A:

Level order traversal is actually a BFS .
We visit every node on a level before going to a lower level.  
So , to find nodes at a distance X units from a given node , you don't need to travel full graph (which can be very large ) ,
but just need to traverse all nodes at distance <=X , consider the case when X is very small compared to height of tree  .  
Example : i can think of GPS .

