Part 11 of 15 in Binary Search Trees  

Verify whether a given binary tree is binary search tree or not. by animeshn

Problem statement

Verify whether a given binary tree is binary search tree or not.

Input

You need to write a function named "VerifyBinarySearchTree" that will take root of a binary tree as argument.

Output

Your function must return an integer : 1, f binary tree is BST, 0 otherwise.



To try out your code



Sign in

Sign up