what if, the client passes an unsorted array as an argument in construct function, then how it will manage the property of bst . (left should be smaller than the root node and right should be greater than the root node.)
Construction of bst
If you pass an unsorted BST. Ideally it will follow the BST property left should be smaller than the root node and right should be greater than the root node.).
But you need to write code for that accordingly.