I’m not getting the correct output. Please check the code…
Create tree using inorder & preorder
you have to take preorder array first then inorder array
but you reverse the order
after this change code will give correct output
i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course
1 Like