Leetcode 127 Word Ladder

https://leetcode.com/problems/word-ladder/description This problem can be solved by BFS for a couple of reasons: Based on our BFS template, at each step(word), we need to find the possible neighbors(next word given only one letter is changed and it’s in the wordList). This is probably the trickiest part of the problem but we can simply loop through … Continue reading Leetcode 127 Word Ladder