Given two integer arrays preorder and inorder that record the preorder and inorder traversals of the same binary tree, rebuild the tree and return its root.
You may assume all values are distinct. Return the reconstructed tree; it will be compared by its level-order array form.
Both inputs are plain number arrays.
[3,9,20,15,7], [9,3,15,20,7][-1], [-1][1,2], [2,1][1,2], [1,2][3,1,2,4], [1,3,2,4][1,2,3,4,5], [3,2,4,1,5]