MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / build_dict

Method build_dict

676-implement-magic-dictionary.rs:14–18  ·  view source on GitHub ↗
(&mut self, dictionary: Vec<String>)

Source from the content-addressed store, hash-verified

12 }
13
14 fn build_dict(&mut self, dictionary: Vec<String>) {
15 for s in dictionary {
16 self.mmp.entry(s.len()).or_insert(Vec::new()).push(s.chars().collect::<Vec<char>>());
17 }
18 }
19
20 fn search(&self, search_word: String) -> bool {
21 let search_word_len = search_word.len();

Callers 1

mainFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected