LevelOrderTreeIterator
Tree is iterated by using `Level-order Traversal Algorithm" In level-order traversal we iterating nodes level by level, starting from root, and going deeper and deeper in tree.
E.g.
1
/ | \
/ | \
2 3 4
/ \ / | \
5 6 7 8 9
/ / | \
10 11 12 13
Output: 1 2 3 4 5 6 7 8 9 10 11 12 13
Content copied to clipboard