I am getting a slightly different output than the required one. Please help
Creating a tree using preorder and inorder
you have to add one more condition
if(start==end){
i++;
return root;
}
Modified Code
I am getting a slightly different output than the required one. Please help
you have to add one more condition
if(start==end){
i++;
return root;
}
Modified Code