Algorithm: <br/>First, pick the first element in preorder and use it to create tree's root.<br/>Second, find the picked element’s index in the inorder array. Let the index be rootIndex.<br/>Third, use rootIndex to calculate number of left children and right children, represent results as numLeft and numRight respectively.<br/>Fourth, if numLeft > 0, root has left child, call buildTree for elements before rootIndex and make the built tree as left subtree of root.<br/>Fifth, if numRight > 0, root has right child, call buildTree for elements after rootIndex and make the built tree as right subtree of root.<br/>Fifth, return TreeNode root.