Not able to make the tree with this type of input

10 true 20 true 40 false false true 50 false false true 30 true 60 false false true 73 false false

Hey @vinishthanai
Input has to be taken in the following way:-
In the above example:-
Basically, true means that you have a child, and false means no child, and thus for input , you will take data and along with that you need to take a string value, so firstly you will take data value, then string is true, means that 20 is the left child, then again true means that 40 is the left child of 20, and then you have false which means that there is no left child , and then again false means that you dont have a right child , you have to follow this approach for building tree

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.