


The first line contains the integer 'T' denoting the number of test cases. Each test case contains:
The first line of each test case contains elements of the BST in the level order form (If any node does not have a left or right child, take -1 in its place).
The second line of each test case contains two integers, 'min', and 'max' (separated by space).
For each test case, print 'N' space separated integers denoting the inorder traversal of modified BST.
You don't need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 10 ^ 5
-10 ^ 3 <= nodeVal <= 10 ^ 3
Time Limit: 1sec
The idea is to traverse the BST in postorder manner in such a way that we will consider that left and right subtree is already fixed. We will consider 3 cases.
Case1: If the data of root < minimum range, then we will return root's right subtree.
Case2: If the data of root > maximum range, then we will return root's left subtree.
Case3: If the data of root lies in the range then return root to the function.
Approach:
Sorted Doubly Linked List to Balanced BST
Longest Substring with K-Repeating Characters
Expression Add Operators
Gray Code Transformation
Count of Subsequences with Given Sum