Skip to content

Commit fc5ab05

Browse files
authored
update space complexity comment
1 parent 594ca24 commit fc5ab05

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
@@ -35,7 +35,7 @@ def string_rotation(s1: str, s2: str) -> bool:
3535
This is guaranteed to happen if we have s1 + s1 = baba
3636
because ab shows up in there.
3737
Runtime: worst case: O(n^2) - substring found at end of full string
38-
Space Complexity: O(1)
38+
Space Complexity: O(n)
3939
:param s1: the rotated string
4040
:param s2: the original string
4141
:return: true if s2 is a rotation of s1, false otherwise

0 commit comments

Comments
 (0)