Construct Binary Tree from Preorder and Inorder Traversal

I’m getting runtime error!