Build a tree from its traversals
Preorder names a range's root first; inorder puts its left subtree before it and its right subtree after it. Find the root in inorder, split the range in two, and build each half the same way.
A node of tree appears once its TreeNode is made. Each call stack entry shows its inorder range and preorderIndex.