MCPcopy Create free account
hub / github.com/careercup/ctci / main

Method main

java/Chapter 9/Question9_2/QuestionDP.java:64–77  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

62 }
63
64 public static void main(String[] args) {
65 maze = AssortedMethods.randomMatrix(size, size, 0, 5);
66 AssortedMethods.printMatrix(maze);
67 ArrayList<Point> path = new ArrayList<Point>();
68 Hashtable<Point, Boolean> cache = new Hashtable<Point, Boolean>();
69 boolean success = getPath(size - 1, size - 1, path, cache);
70
71 if (success) {
72 String s = AssortedMethods.listOfPointsToString(path);
73 System.out.println("Path: " + " " + s);
74 } else {
75 System.out.println("No path exists.");
76 }
77 }
78
79}

Callers

nothing calls this directly

Calls 4

randomMatrixMethod · 0.95
printMatrixMethod · 0.95
getPathMethod · 0.95
listOfPointsToStringMethod · 0.95

Tested by

no test coverage detected