Top view of binary tree without hashing. Solution are Iterative we are using a queue.
For example Given binary tree are contain following nodes.
Top View : 1 2 3 8 9
C program for Print Top view of Binary tree using Queue.
View Code execution process.
View Queue nodes and pointers.
Try it Yourself