All prompts are owned by LeetCode. To view the prompt, click the title link above.
Completed during Biweekly Contest 136 (q1)
First completed : August 03, 2024
Last updated : August 03, 2024
Related Topics : Array, Hash Table, Counting
Acceptance Rate : 61.37 %
class Solution:
def winningPlayerCount(self, n: int, pick: List[List[int]]) -> int:
picked = [Counter() for _ in range(n)]
for p, b in pick :
picked[p][b] += 1
counter = 0
for i in range(n) :
if any(c >= i + 1 for c in picked[i].values()) :
counter += 1
pass
return counter