Skip to content

Commit 12ee46e

Browse files
committed
Runtime: 7928 ms (Top 10.31%) | Memory: 14.1 MB (Top 82.43%)
1 parent 37d7287 commit 12ee46e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/O/Ones and Zeroes/Ones and Zeroes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 7928 ms (Top 10.31%) | Memory: 14.1 MB (Top 82.43%)
12
class Solution:
23
def findMaxForm(self, strs: List[str], m: int, n: int) -> int:
34
dp = [[0 for _ in range(m+1)] for _ in range(n + 1)]
@@ -7,4 +8,4 @@ def findMaxForm(self, strs: List[str], m: int, n: int) -> int:
78
for i in range(n, ones-1, -1):
89
for j in range(m, zeroes-1, -1):
910
dp[i][j] = max(dp[i][j], dp[i-ones][j-zeroes]+1)
10-
return dp[n][m]
11+
return dp[n][m]

0 commit comments

Comments
 (0)