Reformat code
This commit is contained in:
1 parent
51c12cc0ea
commit
60c654936a
31 files changed
+262
-466
No files matched your search
@@ -1,16 +1,13 @@
|
||||
package search;
|
||||
|
||||
public class SearchTestUtils
|
||||
{
|
||||
public static <T> void printSolution(final Node<T> targetNode)
|
||||
{
|
||||
public class SearchTestUtils {
|
||||
public static <T> void printSolution(final Node<T> targetNode) {
|
||||
var node = targetNode;
|
||||
|
||||
System.out.println("Read from down to top!");
|
||||
System.out.println("END");
|
||||
|
||||
while (node != null)
|
||||
{
|
||||
while (node != null) {
|
||||
System.out.println(node);
|
||||
node = node.getParent();
|
||||
}
|
||||
@@ -18,13 +15,11 @@ public class SearchTestUtils
|
||||
System.out.println("START");
|
||||
}
|
||||
|
||||
public static <T> int countNodes(final Node<T> targetNode)
|
||||
{
|
||||
public static <T> int countNodes(final Node<T> targetNode) {
|
||||
var node = targetNode;
|
||||
|
||||
int nodeCount = 0;
|
||||
while (node != null)
|
||||
{
|
||||
while (node != null) {
|
||||
nodeCount++;
|
||||
node = node.getParent();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user