Construct Binary Tree from Preorder and Inorder Traversal
Problem
Input: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7] Output: [3,9,20,null,null,15,7]Input: preorder = [-1], inorder = [-1] Output: [-1]
Pseudocode
Solution
Time and Space Complexity
Time
Space
Last updated
