Monday, September 16, 2013

Print Tree Level Order one in each line

Given a binary tree, which is not necessarily balanced, print the nodes in the tree in a level-wise manner. Also, nodes on the same level should be printed on a single line.

Can be done with Queue data structure with null pointer additiond

No comments:

Post a Comment