In what form input is taken?

what is the data type in which input format is taken

@anuragsingh04548 you are given the nodes in pre-order format

  1. root node value,
  2. boolean value indicating whether left node exists,
    if left node exists then build left tree recursively
  3. boolean value indicating whether right node exists,
    if right node exists then build right tree recursively

true and false values should be taken as string, rest node values can be taken as int
take input using cin so only 1 (space separated) value is taken at a time.

well the UI should be more user friendly i guess.

wasted so much time on this. I was doubting my algo and was doing dry run from last 1.5 hr and I was not able to find my mistake

@anuragsingh04548 sample input and output are mentioned in the question.

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.