MCPcopy
hub / github.com/careercup/ctci / setupDictionary

Method setupDictionary

java/Chapter 18/Question18_10/Question.java:70–76  ·  view source on GitHub ↗
(String[] words)

Source from the content-addressed store, hash-verified

68 }
69
70 public static HashSet<String> setupDictionary(String[] words) {
71 HashSet<String> hash = new HashSet<String>();
72 for (String word : words) {
73 hash.add(word.toUpperCase());
74 }
75 return hash;
76 }
77
78 public static void main(String[] args) {
79 String[] words = {"maps", "tan", "tree", "apple", "cans", "help", "aped", "free", "apes", "flat", "trap", "fret", "trip", "trie", "frat", "fril"};

Callers 1

mainMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected