Given two binary search trees root1 and root2.
Return a list containing all the integers from both trees sorted in ascending order.
|
|
|
|
Constraints:
- Each tree has at most 5000 nodes.
- Each node’s value is between [-10^5, 10^5].
Solution DFS
|
|
Solution Stack
|
|