Fix size-calculation for multi-value nodes

This commit is contained in:
Manuel Thalmann 2022-10-31 21:45:28 +01:00
parent 7a8e7a973d
commit 532788980e

View file

@ -19,7 +19,7 @@ public class AVLSearchTree<T extends Comparable<T>> extends SortedBinaryTree<T>
@Override
protected int calcSize(TreeNode<T> p) {
// TODO Implement (6.2)
return super.calcSize(p);
return super.calcSize(p) + p.values.size() - 1;
}
/**