Given the root node of a **Binary Tree**, determine if it is a Binary **Search** Tree.

**Examples:**

20

/ \

15 30

/ \

14 18

output ==> true

20

/ \

30 15

/ \

14 18

output ==> false

Need a **hand?** Try out these hints, one at a time.

A BST must follow the Binary Search Tree property which states that the key in each node must be greater than all keys stored in the left sub-tree, and smaller than all keys in right sub-tree.

Traverse the Binary Tree. At each step check for the BST property. If the BST property is violated, return false. At the end of the traversal, return true.

public static boolean validateBST(TreeNode root) { }

**C**

**Java**

**Python**