Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.1 KB

_3238. Find the Number of Winning Players.md

File metadata and controls

43 lines (30 loc) · 1.1 KB

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Completed during Biweekly Contest 136 (q1)

Back to top


First completed : August 03, 2024

Last updated : August 03, 2024


Related Topics : Array, Hash Table, Counting

Acceptance Rate : 61.37 %


Solutions

Python

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