Problem 105 · Medium

Construct Binary Tree from Preorder and Inorder Traversal

Recursively split preorder/inorder arrays: preorder[0] is the root, inorder split defines left and right subtrees.

Open the interactive visualisation