Create tree using inorder & preorder

I’m not getting the correct output. Please check the code…

@prashantverma.vn

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