Construct Binary Tree from Preorder and Inorder Traversal: Interactive Visualizer

Given preorder and inorder arrays, recursively construct a binary tree. Preorder gives the root, while inorder splits left and right subtrees.