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

Method main

java/Chapter 18/Question18_5/Question.java:61–73  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

59 }
60
61 public static void main(String[] args) {
62 String[] wordlist = AssortedMethods.getLongTextBlobAsStringList();
63 System.out.println(AssortedMethods.stringArrayToString(wordlist));
64
65 String[][] pairs = {{"Lara", "the"}, {"river", "life"}, {"path", "their"}, {"life", "a"}};
66 for (String[] pair : pairs) {
67 String word1 = pair[0];
68 String word2 = pair[1];
69 int distance = shortest(wordlist, word1, word2);
70 boolean confirm = searchConfirm(wordlist, word1, word2, distance);
71 System.out.println("Distance between <" + word1 + "> and <" + word2 + ">: " + distance + " (" + confirm + ")");
72 }
73 }
74
75}

Callers

nothing calls this directly

Calls 4

stringArrayToStringMethod · 0.95
shortestMethod · 0.95
searchConfirmMethod · 0.95

Tested by

no test coverage detected