I think challenge here is not the Execution time, but the storage. 300 ! or
400! should generally go beyond the storage capabilities of long long ints
in cpp.
@ Rohit Saraf: Hence, I don't know if even tail recursion will ultimately be
able to store the output.
I think Rajesh Patidar's answer fits
@ Rajesh: there may be a problem with this solution.
Suppose I start detaching the nodes from the binary tree in the following
order - > Root, Left, Right.
So as soon as i detach the root of the binary tree and form a new BST with
it ( on which i m going to make further node additions), I am left w