Simple HashTable || Beats 100%✅
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nTips : Use Map inside M
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nTips : Use Map inside Map to keep track of count of corresponding index to the color ball Freq.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int winningPlayerCount(int n, int[][] pick) {\n        Map<Integer, Map<Integer, Integer>> k = new HashMap<>();\n        for (int[] i : pick) {\n            int idx = i[0];\n            int clr = i[1];\n            k.putIfAbsent(idx, new HashMap<>());\n            k.get(idx).put(clr, k.get(idx).getOrDefault(clr, 0) + 1);\n        }\n        int ans = 0;\n        for (int i=0;i<n;i++) {\n            Map<Integer,Integer> map = k.get(i);\n            if (map!=null) {\n                int max = 0;\n                for (int val : map.values()) {\n                    if (val>max) max = val;\n                }\n                if (max>i) ans++;\n            }\n        }\n        return ans;\n    }\n}\n```
['Hash Table', 'Ordered Map', 'Counting', 'C++', 'Java']