We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a84d9db commit fe953afCopy full SHA for fe953af
1 file changed
Python/word-ladder-ii.py
@@ -1,5 +1,5 @@
1
-# Time: O((25n)^n)
2
-# Space: O((25n)^n)
+# Time: O(n * d), n is length of string, d is size of dictionary
+# Space: O(d)
3
#
4
# Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:
5
0 commit comments