Not giving correct output of inorder traversal of 1 3 5 4 7 8 10 -1 as it is the example of the video in which , sir has taught that it is not a BST but this code is showing it as BST. I am not able to find error in the code .
Error in checking the BST
you are building bst from the given input
and then checking is it a bst ?
it will always a bst
first form binary tree from given input and then check whether it is bst or not?