Word Ladder (LC #127) finds the shortest transformation from start word to end word, changing one letter at a time. Model as a graph where words are nodes and edges connect words differing by one letter. BFS finds the shortest path. For each word, try all letters at each position instead of comparing all word pairs. Use a set for O() lookup. Track visited words to avoid cycles. This runs in where is word length and is word count. BFS guarantees the first path found is shortest.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/graphs/word-ladder
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████