Construct a binary tree by a preorder array and a inorder array.

See my diagram for a resolution at here