https://online.codingblocks.com/player/12357/content/5297
In this question, we can’t build a unique BST from inorder alone so how we get unique preorder output?
Built binary search tree
Hi Prabhat, the question states that you have to build a balanced Binary Search Tree. The middle element of the array will be the root of the bst. Similarly, the middle of the left half will be the root of left subtree and the middle of the right half will be the root of right subtree. This way you will get a unique balanced bst.