Changeable words: Difference between revisions
Content deleted Content added
m Minor edit to Java code |
|||
Line 622: | Line 622: | ||
} |
} |
||
} |
} |
||
System.out. |
System.out.printf("Changeable words in %s:\n", fileName); |
||
int n = 1; |
int n = 1; |
||
for (String word1 : dictionary) { |
for (String word1 : dictionary) { |
||
for (String word2 : dictionary) { |
for (String word2 : dictionary) { |
||
if (word1 != word2 && hammingDistance(word1, word2) == 1) |
if (word1 != word2 && hammingDistance(word1, word2) == 1) |
||
System.out. |
System.out.printf("%2d: %-14s -> %s\n", n++, word1, word2); |
||
} |
} |
||
} |
} |