We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37d7287 commit 12ee46eCopy full SHA for 12ee46e
scripts/algorithms/O/Ones and Zeroes/Ones and Zeroes.py
@@ -1,3 +1,4 @@
1
+# Runtime: 7928 ms (Top 10.31%) | Memory: 14.1 MB (Top 82.43%)
2
class Solution:
3
def findMaxForm(self, strs: List[str], m: int, n: int) -> int:
4
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:
7
8
for i in range(n, ones-1, -1):
9
for j in range(m, zeroes-1, -1):
10
dp[i][j] = max(dp[i][j], dp[i-ones][j-zeroes]+1)
- return dp[n][m]
11
+ return dp[n][m]
0 commit comments