bahiya isma input kaasa la
Identical struture
Hello @sehrawat in this you can make the build function in which you will give two conditions one for when the string is true and the other for false when the it has no child.
when it has no child you will simple attach null to it but when it has child then you will form the node for the data value and then you will check for the child strings of and then pass them to attach at the left and right following the same criteria mentioned above.
Here for your reference i am attaching the code:
if you have any further doubt you can ask here:
Happy Learning!!
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.