Construct Tree from given Inorder and Preorder traversals
Given in-order and pre-order traversals of a Binary Tree, the task is to construct the Binary Tree and return its root.Example:Input: inorder[] = [3, 1, 4, 0, 5, 2], preorder[] = [0, 1, 3, 4, 2, 5]Output: [0, 1, 2, 3, 4, 5]Explanation: The tree will look like: Table of Content[Naive Approach] Using