Another approach for checking tree is bst or not

If i check that the inorder traversal of a tree is sorted, will it always be a bst?

Yes, checking if the inorder traversal of a tree is sorted confirms it’s a BST, provided no duplicate values exist and all nodes satisfy the BST property during traversal.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.