I am not able to write the code for building a binary tree in level order fashion.Ex.1 2 3 4 5 6 -1 -1 -1 -1 -1 -1 -1.
I am not able to handle the case for input as -1.
https://ide.codingblocks.com/s/207469. Could you please help me out?
Building a tree in level order fashion
the level order fashion can be read using a queue. the way to implement it is:
thanks