mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-20 04:37:36 +00:00
fix: correct typo "util" to "until" (#12653)
This commit is contained in:
parent
5afe02994e
commit
a4576dc2a4
@ -42,7 +42,7 @@ class AssignmentUsingBitmask:
|
|||||||
return self.dp[mask][task_no]
|
return self.dp[mask][task_no]
|
||||||
|
|
||||||
# Number of ways when we don't this task in the arrangement
|
# Number of ways when we don't this task in the arrangement
|
||||||
total_ways_util = self.count_ways_until(mask, task_no + 1)
|
total_ways_until = self.count_ways_until(mask, task_no + 1)
|
||||||
|
|
||||||
# now assign the tasks one by one to all possible persons and recursively
|
# now assign the tasks one by one to all possible persons and recursively
|
||||||
# assign for the remaining tasks.
|
# assign for the remaining tasks.
|
||||||
@ -54,10 +54,10 @@ class AssignmentUsingBitmask:
|
|||||||
|
|
||||||
# assign this task to p and change the mask value. And recursively
|
# assign this task to p and change the mask value. And recursively
|
||||||
# assign tasks with the new mask value.
|
# assign tasks with the new mask value.
|
||||||
total_ways_util += self.count_ways_until(mask | (1 << p), task_no + 1)
|
total_ways_until += self.count_ways_until(mask | (1 << p), task_no + 1)
|
||||||
|
|
||||||
# save the value.
|
# save the value.
|
||||||
self.dp[mask][task_no] = total_ways_util
|
self.dp[mask][task_no] = total_ways_until
|
||||||
|
|
||||||
return self.dp[mask][task_no]
|
return self.dp[mask][task_no]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user