Level order input

Sir how do i do a level order input in a binary tree.

We use queue for that, we insert the root in the queue then for each input as not -1 ,we first make a new node with that value and then make the q.front left/right equal to that value.Please see my code for more details.