Leetcode 433. Minimum Genetic Mutation
Given 8-char gene strings and a bank of allowed genes, find the minimum number of single-character mutations to transform startGene into endGene by moving only between bank-valid strings; model this as a graph where edges connect strings that differ by one character and use BFS to get the shortest path (return -1 if unreachable). The gene alphabet is {A,C,G,T} and bank size is small (≤10), so exhaustive BFS over valid nodes is feasible.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.