105. Construct Binary Tree from Preorder and Inorder Traversal
·
Algorithm
Construct Binary Tree from Preorder and Inorder Traversal - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 이진트리의 PreOrder 순회 결과와 InOrder 순회 결과를 입력하면 이진트리를 복원해서 반환하는 문제다. 1. 4개의 index 값을 이용한 DFS from typing import * class Solution: def buildTree(self, preorder: List[int], inorder: ..