what will be the stopping condition for the input
How to take input in this question?
@anushreemahur5, here you have to take input level order wise where -1 denotes a null node
refer this program for more clarity
In case of any doubt feel free to ask 
mark your doubt as resolved if you got the answer