Create tree from inorder preorder


What is wrong with my code i there a logical error or a compilation error?

issue is probably becuase of size of array u have declared