Build tree from post order and inorder

facing problem in coading

Hey,make a refrence variable in the function that stores post order index and find that value in inorder traversal and make call to left and right node with that index of preorder value in the inorder traversal and decrease preorder index

Please go through this link for more details.

can u plzz check my code once why there is segmentation fault occurs

can any one plzz reply
and clear my doubt