how to check if a binary tree is a BST code example
Example: how to check if a binary tree is a BST
1 def checkBST(t)
2 return false if t==nil
3 if t.left!=nil && t.left>t
4 return false
5 end
6 if t.right!=nil && t.right