From 24225d75953b99f9f32fc6a79d6ba6229e4b08e5 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 31 Oct 2022 20:20:13 +0100 Subject: [PATCH] Print tree size --- app/src/main/java/ch/nuth/zhaw/exbox/RankingTreeServer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/RankingTreeServer.java b/app/src/main/java/ch/nuth/zhaw/exbox/RankingTreeServer.java index 0e638ca..b6a8999 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/RankingTreeServer.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/RankingTreeServer.java @@ -32,6 +32,7 @@ public class RankingTreeServer implements CommandExecutor { public String execute(String rankingList) { Tree competitorTree = createTree(rankingList); - return "Rangliste (Tree)\n" + createSortedText(competitorTree); + return "Rangliste (Tree)\n" + createSortedText(competitorTree) + "\n\n" + + "Height: " + competitorTree.height() + "\nSize: " + competitorTree.size(); } }