File tree 1 file changed +0
-25
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .HashSet ;
4
4
import java .util .Set ;
5
5
6
- /**
7
- * 676. Implement Magic Dictionary
8
- * Implement a magic directory with buildDict, and search methods.
9
- * For the method buildDict, you'll be given a list of non-repetitive words to build a dictionary.
10
- * For the method search, you'll be given a word,
11
- * and judge whether if you modify exactly one character into another character in this word,
12
- * the modified word is in the dictionary you just built.
13
-
14
- Example 1:
15
-
16
- Input: buildDict(["hello", "leetcode"]), Output: Null
17
- Input: search("hello"), Output: False
18
- Input: search("hhllo"), Output: True
19
- Input: search("hell"), Output: False
20
- Input: search("leetcoded"), Output: False
21
-
22
- Note:
23
-
24
- You may assume that all the inputs are consist of lowercase letters a-z.
25
- For contest purpose, the test data is rather small by now.
26
- You could think about highly efficient algorithm after the contest.
27
- Please remember to RESET your class variables declared in class MagicDictionary,
28
- as static/class variables are persisted across multiple test cases. Please see here for more details.
29
-
30
- */
31
6
public class _676 {
32
7
33
8
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments