Skip to content

Commit 594ca24

Browse files
committed
update runtime comment
1 parent ef93c06 commit 594ca24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/chapter01/1.9 - String Rotation/miguel_1.9_sol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def string_rotation(s1: str, s2: str) -> bool:
3434
a larger string ..ab..
3535
This is guaranteed to happen if we have s1 + s1 = baba
3636
because ab shows up in there.
37-
Runtime: O(n)
37+
Runtime: worst case: O(n^2) - substring found at end of full string
3838
Space Complexity: O(1)
3939
:param s1: the rotated string
4040
:param s2: the original string

0 commit comments

Comments
 (0)