java.lang.Object
g1301_1400.s1305_all_elements_in_two_binary_search_trees.Solution

public class Solution extends Object
1305 - All Elements in Two Binary Search Trees\. Medium Given two binary search trees `root1` and `root2`, return _a list containing all the integers from both trees sorted in **ascending** order_. **Example 1:** ![](https://assets.leetcode.com/uploads/2019/12/18/q2-e1.png) **Input:** root1 = [2,1,4], root2 = [1,0,3] **Output:** [0,1,1,2,3,4] **Example 2:** ![](https://assets.leetcode.com/uploads/2019/12/18/q2-e5-.png) **Input:** root1 = [1,null,8], root2 = [8,1] **Output:** [1,1,8,8] **Constraints:** * The number of nodes in each tree is in the range `[0, 5000]`. * -105 <= Node.val <= 105
  • Constructor Details

    • Solution

      public Solution()
  • Method Details