Coding Interview PatternsBuild Binary Tree from Preorder and Inorder Traversal
MediumTree Depth-First Search
Build Binary Tree from Preorder and Inorder Traversal
Explanation & Solution
Description
Given two integer arrays preorder and inorder representing the preorder and inorder traversal of a binary tree, construct and return the binary tree.