Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Do the search */
- private static void search(String[] args) {
- if (args.length != 2) {
- System.err.println(USAGE);
- return;
- }
- int[] intArgs = convertArgs(args);
- int from = intArgs[0];
- int to = intArgs[1];
- System.out.println("Path between " + from + " and " + to + ":");
- System.out.println(findPath(graph, from, to));
- }
- /** Convert the arguments */
- private static int[] convertArgs(String[] args) {
- int[] intArgs = new int[args.length];
- for(int i = 0; i < args.length; i++) {
- intArgs[i] = Integer.parseInt(args[i]);
- }
- return intArgs;
- }
Add Comment
Please, Sign In to add comment