How to create such tree?

how to create such tree?

hi @rajsaxena.personal first you are given value of the root, and then two strings indicating whether it has left child, and right child or not. If it has left child then you call the function recursively for the left subtree and after you are done building the left subtree you come back to that call, and repeat for the right subtree