Here also i am getting confused … how to take input during building tree… I think i haven’t understood that part …
Here all -1 are at last… Please suggest me what should i do?
Thanks
Doubt in getting input to build tree
hello @ashishnnnnn you can build the tree with the help of the queue.
try to implement with the help of the queue if you still face any issue please ask here i will let you know .
Happy Learning !!
Sorry … I haven’t got how to use queue for this…
@ashishnnnnn https://ide.codingblocks.com/s/351788
try this .
if you still have any doubt do let me know .
Happy Learning !!
It got accepted … I was only having confusion how to make the tree with given input style.
How should i get comfortable with this. This is also not much taught in lecture.
In previous question also … all logic i have implemented… Just getting confused … how to build the tree with given input style.
Please suggest something… How should i learn this,
Thanks
@ashishnnnnn mostly trees are buid with the help of the queue only and dont worry there must be around 10-15 questions on trees in your portal .
just do them all and you will be able to conquer your fear .
incase you still feel any doubt you can again raise the doubt .
Happy Learning !!