solved Task 4
This commit is contained in:
parent
a63689aeb0
commit
87da5e2551
|
@ -12,9 +12,10 @@ public class AVLSearchTree<T extends Comparable<T>> extends SortedBinaryTree<T>
|
|||
|| (node.right != null && !balanced(node.right))
|
||||
|| (node.left != null && !balanced(node.left))){
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean balanced() {
|
||||
return balanced(root);
|
||||
|
|
Loading…
Reference in New Issue