Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Minimum Genetic Mutation
Bookmark
Bank Scan
Generate
DFS
Input
Example 1: one mutation
Example 2: two mutations
No path: impossible
Two steps via bank
Custom
startGene
=
AACCGGTT
,
endGene
=
AACCGGTA
,
bank
=
[AACCGGTA]
queue
queue
queue
queue
AACCGGTT
AACCGGTT
front / rear
queue
AACCGGTT
queue
AACCGGTT
queue
AACCGGTT
queue
AACCGGTT
AACCGGTA
queue
algo
master
.
io
Step:
Mutate "AACCGGTT" into "AACCGGTA" in as few steps as possible
0 / 7
Input
Example 1: one mutation
Example 2: two mutations
No path: impossible
Two steps via bank
Custom
startGene
=
AACCGGTT
,
endGene
=
AACCGGTA
,
bank
=
[AACCGGTA]
0 / 7
algo
master
.
io
Step:
Mutate "AACCGGTT" into "AACCGGTA" in as few steps as possible