Is balanced ques

How to build tree for the input, I’ve tried https://ide.codingblocks.com/s/63179 but it is not printing anything
Question- https://hack.codingblocks.com/contests/c/537/475

@Simran-Tuteja-2103059593355380 you can refer this.

Why have you written return NULL in line 32

@Simran-Tuteja-2103059593355380 basically it’s for false in input string you can see false is also there so i design my function in such a way that when “true” comes root creates for left as well as right in a similar manner. but if “false” comes i.e the root has no child, so if child is not present then we have to connect the above root node with null .The above root can be left or right.