
[LeetCode] 2196. Create Binary Tree From Descriptions (Python)
·
알고리즘/LeetCode
난이도: Medium문제 설명 You are given a 2D integer array descriptions where descriptions[i] = [parenti, childi, isLefti] indicates that parenti is the parent of childi in a binary tree of unique values. Furthermore, If isLefti == 1, then childi is the left child of parenti.If isLefti == 0, then childi is the right child of parenti. Construct the binary tree described by descriptions and return its root..