Fix size-calculation for multi-value nodes
This commit is contained in:
parent
7a8e7a973d
commit
532788980e
1 changed files with 1 additions and 1 deletions
|
@ -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