Skip to content

Commit a4576dc

Browse files
authored
fix: correct typo "util" to "until" (#12653)
1 parent 5afe029 commit a4576dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: dynamic_programming/bitmask.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def count_ways_until(self, mask, task_no):
4242
return self.dp[mask][task_no]
4343

4444
# Number of ways when we don't this task in the arrangement
45-
total_ways_util = self.count_ways_until(mask, task_no + 1)
45+
total_ways_until = self.count_ways_until(mask, task_no + 1)
4646

4747
# now assign the tasks one by one to all possible persons and recursively
4848
# assign for the remaining tasks.
@@ -54,10 +54,10 @@ def count_ways_until(self, mask, task_no):
5454

5555
# assign this task to p and change the mask value. And recursively
5656
# assign tasks with the new mask value.
57-
total_ways_util += self.count_ways_until(mask | (1 << p), task_no + 1)
57+
total_ways_until += self.count_ways_until(mask | (1 << p), task_no + 1)
5858

5959
# save the value.
60-
self.dp[mask][task_no] = total_ways_util
60+
self.dp[mask][task_no] = total_ways_until
6161

6262
return self.dp[mask][task_no]
6363

0 commit comments

Comments
 (0)