1305. All Elements in Two Binary Search Trees
·
Algorithm
All Elements in Two Binary Search Trees - 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 2개의 이진 탐색 트리가 주어진다. 두 트리의 value값을 오름차순 정렬한 list를 반환하는 문제다. Input: root1 = [2,1,4], root2 = [1,0,3] Output: [0,1,1,2,3,4] 1. 중위 순회(in-order traversal) class Solution: def getAllElements(self, r..