For example
if the input is:
Output should be false:
As 4 in the left sub-tree is greater than the root value(3)
If the input is:
Output should be true
A binary tree is BST if it satisfies any one of the following condition:
It is empty
It has no subtrees
For every node x in the tree all the keys (if any) in the left sub tree must be less than key(x) and all the keys (if any) in the right sub tree must be greater than key(x).
So a straightf...