how to build a binary tree from preorder and inorder traversals
问题 Im doing an assignment on building a binary tree from the preorder and inorder traversals (a char in each Node) and im trying to wrap my brain around how to build the actual tree. Here is my thought process on how to accomplish this: store the first entry in the preorder as the root node search the inorder for that entry. take the chars to the left of the root node and save them as a char array. take the chars to the right of the root node and save them as a char array. make a new tree, with