Build tree from postorder and inorder

segmentation fault occur in my code can u plz tell why this happens