Print tree size
This commit is contained in:
parent
2d1e65730c
commit
24225d7595
1 changed files with 2 additions and 1 deletions
|
@ -32,6 +32,7 @@ public class RankingTreeServer implements CommandExecutor {
|
||||||
|
|
||||||
public String execute(String rankingList) {
|
public String execute(String rankingList) {
|
||||||
Tree<Competitor> competitorTree = createTree(rankingList);
|
Tree<Competitor> competitorTree = createTree(rankingList);
|
||||||
return "Rangliste (Tree)\n" + createSortedText(competitorTree);
|
return "Rangliste (Tree)\n" + createSortedText(competitorTree) + "\n\n" +
|
||||||
|
"Height: " + competitorTree.height() + "\nSize: " + competitorTree.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue