LeetCode: https://leetcode.com/problems/all-elements-in-two-binary-search-trees/
Return a sorted array containing all elements from two BSTs.
2
0
4
1
6
2
|
3
1
4
3
5
5
6
a=[2, 4, 6]
b=[1, 3, 5]
Step 1 / 3
Step 1:
Extract two inorder arrays.
Focus: select @ [0, 3]