solved s06 ex05
This commit is contained in:
parent
4fd8fb4f83
commit
abf20083d1
@ -124,6 +124,7 @@ public class AVLSearchTree<T extends Comparable<T>> extends SortedBinaryTree<T>
|
||||
public T remove(T x) {
|
||||
TreeNode<T> removed = new TreeNode<T>(null);
|
||||
root = removeAt(root, x, removed);
|
||||
root = balance(root);
|
||||
return removed.element;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user