Fix size-calculation for multi-value nodes
This commit is contained in:
parent
7a8e7a973d
commit
532788980e
|
@ -19,7 +19,7 @@ public class AVLSearchTree<T extends Comparable<T>> extends SortedBinaryTree<T>
|
||||||
@Override
|
@Override
|
||||||
protected int calcSize(TreeNode<T> p) {
|
protected int calcSize(TreeNode<T> p) {
|
||||||
// TODO Implement (6.2)
|
// TODO Implement (6.2)
|
||||||
return super.calcSize(p);
|
return super.calcSize(p) + p.values.size() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue