Skip to content

Conversation

@youngsangsuh
Copy link

Link

Construct Binary Tree from Preorder and Inorder Traversal

Topic

Recursive alg.

Approach

By going through the elements in preorder, we compare with inorder vector. The ones on the left will be on the left tree, and the ones on the right will be on the right tree.

Note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants