Skip to content

Commit f2836b4

Browse files
authored
Update minimum-number-of-work-sessions-to-finish-the-tasks.py
1 parent 6f5b333 commit f2836b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/minimum-number-of-work-sessions-to-finish-the-tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def minSessions(self, tasks, sessionTime):
3636
# dp[mask][0]: min number of sessions by choosing tasks in mask bitset
3737
# dp[mask][1]: min used time of last session by choosing tasks in mask bitset
3838
dp = [[float("inf")]*2 for _ in xrange(1<<len(tasks))]
39-
dp[0] = [1, 0]
39+
dp[0] = [0, sessionTime]
4040
for mask in xrange(len(dp)-1):
4141
basis = 1
4242
for task in tasks:

0 commit comments

Comments
 (0)