Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec isBalanced t = function
- | Leaf -> true
- | Node(t1,_,t2) -> isBalanced t1 &&
- isBalanced t2 &&
- abs(height t1 - height t2) <= 1;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement