In a leetcode problem, I am trying to construct a binary tree from the given preorder and inorder traversal(given in the form of an array).
I keep getting this error :