Binary Tree Level-Order Traversal Using Depth First Search (DFS) [Not to USE BFS]
Given a binary tree, print out the tree in level order (ie, from left to right, level by level). Output a newline after the end of each level. Breadth First Search (BFS) is not allowed. We have already seen how to do level order traversal here.
Example
So consider the tree:
1
/ \
2 3
/ \ / \
4 5 6 7
The BFS or level order traversal here is :
[Read More]