Skip to content

Commit bdc9e57

Browse files
authored
Update maximize-grid-happiness.py
1 parent ad9143b commit bdc9e57

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Python/maximize-grid-happiness.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ def iter_backtracking(i, e):
4949
stk.append((2, (i, e, total)))
5050
stk.append((1, (0,)))
5151
elif step == 1:
52-
curr, x = params
52+
x = params[0]
5353
curr.append(x)
5454
elif step == 3:
55-
curr = params[0]
5655
curr.pop()
5756
return result
5857

@@ -61,7 +60,7 @@ def iter_backtracking(i, e):
6160

6261
# Time: O(C(m * n, i) * C(m * n - i, e))
6362
# Space: O(min(m * n, i + e))
64-
class Solution(object):
63+
class Solution2(object):
6564
def getMaxGridHappiness(self, m, n, introvertsCount, extrovertsCount):
6665
"""
6766
:type m: int

0 commit comments

Comments
 (0)