|All-time Popular Problems|
|Construct Tree from Inorder & Preorder|
|Sum of two large numbers|
|Level order traversal in spiral form|
|Spirally traversing a matrix|
|Angle between hour and minute hand|
|Binary Tree to DLL|
|Smallest Positive missing number|
|Height of Binary Tree|
|Largest Number formed from an Array|
Two of the nodes of a Binary Search Tree (BST) are swapped. Fix (or correct) the BST.
First line consists of T test cases. First line of every test case consists of N, denoting number of elements in BST. Second line of every test case consists 3*N elements 2 integers and a character.
Note: It is guaranteed than the given input will form BST ,except for 2 nodes that will be wrong.
Return the fixed BST.
10 5 L 10 8 R 5 2 L 5 20 R