From 532788980ec0d292c6805dbfa5e2f321262319a1 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 31 Oct 2022 21:45:28 +0100 Subject: [PATCH] Fix size-calculation for multi-value nodes --- app/src/main/java/ch/nuth/zhaw/exbox/AVLSearchTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/AVLSearchTree.java b/app/src/main/java/ch/nuth/zhaw/exbox/AVLSearchTree.java index c7cefd9..e97f9a0 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/AVLSearchTree.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/AVLSearchTree.java @@ -19,7 +19,7 @@ public class AVLSearchTree> extends SortedBinaryTree @Override protected int calcSize(TreeNode p) { // TODO Implement (6.2) - return super.calcSize(p); + return super.calcSize(p) + p.values.size() - 1; } /**