How to make tree with true and false

sir why my code not work and how to make tre with true and false

Hello @YASHMATHURIA123,

Can you please give an example explaining “tree with true and false”

Enter the values of all the nodes in the binary tree in pre-order format where true suggest the node exists and false suggests it is NULL
Sample Input
10 true 20 true 40 false false true 50 false false true 30 true 60 false false true 73 false false
sir how to make tree with these

Hello @YASHMATHURIA123,

You may refer to the following code:

If you don’t understand something in the tree creation logic, let me know.