It gave me TLE. However the solution is similar to the problem where preorder and inorder traversals were given. However that got submitted successfully
same here. my solution is similar to gfg, but it still times out…
Check if you can reduce the complexity by using hashing.
Thanks, hashing is just the thing!