Skip to content

Commit 1f226db

Browse files
authored
Update minimum-number-of-operations-to-make-string-sorted.py
1 parent 1119b04 commit 1f226db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/minimum-number-of-operations-to-make-string-sorted.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Time: O(26 * n) = O(n)
2-
# Space: O(26) = O(1)
2+
# Space: O(max_n) = O(max_n)
33

44
inv = [0, 1]
55

@@ -10,7 +10,6 @@ def makeStringSorted(self, s): # count of prev_permutation
1010
:type s: str
1111
:rtype: int
1212
"""
13-
1413
def inverse(n, m):
1514
i = len(inv)
1615
while len(inv) <= n: # lazy initialization

0 commit comments

Comments
 (0)