Given the roots of two binary search trees, return a single sorted array containing all values from both trees (including duplicates) in ascending order. The input gives two level-order BST arrays separated by ' | '.
Input: Two level-order BST arrays separated by ' | '.
Output: Array — all values merged in sorted order.
Input: [2,1,4] | [1,0,3]
Output: [0,1,1,2,3,4]
Explanation: Merge of both inorders.Input: [5,3,8] | []
Output: [3,5,8]
Explanation: Second tree empty.Input: [1] | [2]
Output: [1,2]
Explanation: Two single nodes.0<=nodes<=10^4 eachvalid BSTs