()
| 26 | /* returns true if given search tree is binary |
| 27 | search tree (efficient version) */ |
| 28 | boolean isBST() { |
| 29 | return isBSTUtil(root, Integer.MIN_VALUE, |
| 30 | Integer.MAX_VALUE); |
| 31 | } |
| 32 | |
| 33 | /* Returns true if the given tree is a BST and its |
| 34 | values are >= min and <= max. */ |