Add some fun stuff

This commit is contained in:
Niklas Birk committed 2023-06-12 18:04:22 +02:00
1 parent e4fcb06949
commit 3c43233d96
5 files changed
+269 -4

No files matched your search

+14
View File
@@ -17,4 +17,18 @@ public class SearchTestUtils
System.out.println("START");
}
public static <T> int countNodes(final Node<T> targetNode)
{
var node = targetNode;
int nodeCount = 0;
while (node != null)
{
nodeCount++;
node = node.getParent();
}
return nodeCount;
}
}