Skip to content

Commit 195e0ce

Browse files
authored
Merge pull request #1711 from ivanpenaloza/july26
addin gupdates
2 parents f666fa7 + 3b4f97f commit 195e0ce

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/my_project/interviews/google_top_exercises/round_1/25_word_ladder.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int
3939
if neighbor not in visited:
4040
visited.add(neighbor)
4141
queue.append((neighbor, level + 1))
42+
print(pattern,visited)
4243
# Clear the bucket so it is not scanned again by another word.
4344
patterns[pattern] = []
4445

4546
return 0
47+
48+
print('hello world')
49+
solution = Solution()
50+
51+
print(solution.ladderLength(beginWord='hat',endWord='hut', wordList=['het',
52+
'hit',
53+
'hot',
54+
'hut']))

0 commit comments

Comments
 (0)