Add some fun stuff
This commit is contained in:
1 parent
e4fcb06949
commit
3c43233d96
5 files changed
+269
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user