|All-time Popular Problems|
|Inorder Successor in BST|
|Maximum Product Subarray|
|Is Binary Number Multiple of 3|
|Pairwise swap elements of a linked list by swapping data|
|Largest Number formed from an Array|
|Reverse an Array|
|Boundary Traversal of binary tree|
|Leaders in an array|
Given two BST, Your task is to complete the function merge which prints the elements of both BSTs in sorted form.
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains three lines. The first line of each test case contain's an integer N and M denoting the size of the two BST's. Then In the next two line are space separated values of the two BST's.
The function should print the elements of both BST's in sorted form.
Example(To be used only for expected output):
1 33 4
6 7 1
1 1 4 6 7 33
1 2 6 9