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