Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Words Within Two Edits of Dictionary
Bookmark
Brute Force
Trie + DFS
Input
Example 1
Example 2
Example 3
Custom
queries
=
[word, note, ants, wood]
,
dictionary
=
[wood, joke, moat]
Mismatches
1
2
3
Result
[ ]
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
Result
[ ]
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
1/2 allowed
Result
[ ]
query
w
o
r
d
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
1/2 allowed
Result
["word"]
query
n
o
t
e
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
0/2 allowed
Result
["word"]
query
n
o
t
e
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
0/2 allowed
Result
["word", "note"]
query
a
n
t
s
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
3/2 allowed
Result
["word", "note"]
query
a
n
t
s
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
3/2 allowed
Result
["word", "note"]
query
a
n
t
s
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
3/2 allowed
Result
["word", "note"]
query
a
n
t
s
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
0/2 allowed
Result
["word", "note"]
query
w
o
o
d
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
Mismatches
1
2
3
Result
["word", "note", "wood"]
dictionary
w
o
o
d
j
o
k
e
m
o
a
t
algo
master
.
io
Step:
Start: check 4 queries against 3 dictionary words
0 / 49
Input
Example 1
Example 2
Example 3
Custom
queries
=
[word, note, ants, wood]
,
dictionary
=
[wood, joke, moat]
0 / 49
algo
master
.
io
Step:
Start: check 4 queries against 3 dictionary words