Python3 O(N) Solution with hash tables (100.00% Runtime)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n\n\n# Approach\n Describe your approach to solving the problem. \n- Utilize a set and
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n![image.png](https://assets.leetcode.com/users/images/c4f954f3-e761-46e0-850b-91812ea06b53_1730710589.1597066.png)\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n- Utilize a set and defaultdict (hash table) to store number of balls of the same color for each player.\n- Whenever a player meets the condition, add the player to the set.\n- Return the length of the set. \n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\nIf this solution is similar to yours or helpful, upvote me if you don\'t mind\n```python3 []\nclass Solution:\n    def winningPlayerCount(self, n: int, pick: List[List[int]]) -> int:\n        d=defaultdict(lambda: defaultdict(int))\n        a=set()\n        for x,y in pick:\n            if x in a:\n                continue\n            d[x][y]+=1\n            if d[x][y] >= x+1:\n                a.add(x)\n        return len(a)\n```
['Array', 'Hash Table', 'Python', 'Python3']