fix: correct typo "util" to "until" (#12653)

This commit is contained in:
Kim 2025-04-09 15:24:37 +09:00 committed by GitHub
parent 5afe02994e
commit a4576dc2a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,7 @@ class AssignmentUsingBitmask:
return self.dp[mask][task_no]
# 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
# assign for the remaining tasks.
@ -54,10 +54,10 @@ class AssignmentUsingBitmask:
# assign this task to p and change the mask value. And recursively
# 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.
self.dp[mask][task_no] = total_ways_util
self.dp[mask][task_no] = total_ways_until
return self.dp[mask][task_no]