construct binary tree from preorder