EASY APPROACH || DICTIONARY || PYTHON || BEATS 95% :)
Intuition\n Describe your first thoughts on how to solve this problem. \nThe first intuition was to use hashpmap to solve the problem in an eassy way\n\n# Appro
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThe first intuition was to use hashpmap to solve the problem in an eassy way\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1.declare a dictionary\n2.iterate through the pick array and seperatly store the player and the color they picked\n3.make it as a tuple and add it to dictionary to get the count of that\n4.now we will have player and how many same color balls they have picked\n5.now just iterate the dictionary and see whether the value (no of same color balls) is equal to their value.if yes increment the count\n6.return the count\n\nNOTE:here we have included tuple as a key so key[0] will be the player number\n\n# Complexity\n- Time complexity: O(m)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n\n\n- Space complexity: O(m+n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n\n# Code\n```python3 []\nclass Solution:\n    def winningPlayerCount(self, n: int, pick: List[List[int]]) -> int:\n        d={}\n        for i in range(len(pick)):\n            player=pick[i][0]\n            color=pick[i][1]\n            if tuple([player,color]) in d:\n                d[tuple([player,color])]+=1\n            else:\n                d[tuple([player,color])]=1\n        \n        print(d)\n        cnt=0\n        seen=set()\n        for k,v in d.items():\n            if v>=k[0]+1:\n                if k[0] not in seen:\n                    cnt+=1\n                    seen.add(k[0])\n\n\n        return cnt\n```
['Python3']