How to make treemin this problem

sir i am not able to make tree out of the given input can u please give me the code of how to make tree with input also including true and false;
sir please provide code i can then compare both trees if the are structurally same or not;

Hi Rahul, please try to solve the questions on your own and if you face any problems, send us your code. We’ll correct it.