Given a Binary Search Tree. The task is to find the minimum element in this given BST.
The task is to complete the function minValue() which takes root as the argument and returns the minimum element of BST. If the tree is empty, there is no minimum elemnt, so retutn -1 in that case.
Expected Time Complexity: O(Height of the BST) Expected Auxiliary Space: O(Height of the BST).