Skip to main content
Medium Queue / BFS Medium frequency

Minimum Genetic Mutation

Open on LeetCode

Approach Summary

BFS where each state is a gene string. Neighbours are all valid strings in the gene bank that differ by exactly one character.

How to Recognize This Pattern

  • "Minimum mutations from start to end through valid banks"
  • Identical structure to Word Ladder — BFS on string states

Complexity Analysis

Time Complexity

O(n × L)

Space Complexity

O(n)

Tags

Hash Table String BFS

This site is free. If these guides are helping your prep, consider buying me a coffee. ☕

Support →
Buy me a coffee