i dont want code i just want diagram or psuedo code of how if true is encountered it is handled and how false is handled and how the tree diagram actually looks like.
How to build a tree and how true false are used
@navin_japes hey check this particular function for input ,you will get it ,its slight different from other input of tree:
https://ide.codingblocks.com/s/247765
Hlo bro,
I want to know just give a diagram how the tree will look like when for the given input it will be build for e.g
10 true 20 true 30 false false like this give me a proper tree diagram with the input and show how the tree is build with dryrun I am having problem I’m drawing a tree based on the given input.
@navin_japes hey suppose there are value 10 true 20 ,basically false represents that child is NULL and value represent the value of child ,take input as string and use recursion to build the tree,dry run the code that I have sent you will get ,when string is false we attach NULL and when string is true we have build tree using recursion,pls check it.
Why my code is not giving output ?
Why my code is not giving correct output please modify the code i am trying to do level order zigzag traversal here is my code: https://ide.codingblocks.com/s/250816
Can’t I do using simple level order traversal using stack I know I wanted to know if there is a way to it using level order Traversal using queue
@navin_japes The code which I have send is actually level order traversal.Dry run it you will get it.
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.