beginner friendly-java sol-easy approach
\n\n# Code\njava []\nclass Solution {\n    public int winningPlayerCount(int n, int[][] pick) {\n        int winners = 0;\n        Map<Integer, Map<Integer, Int
\n\n# Code\n```java []\nclass Solution {\n    public int winningPlayerCount(int n, int[][] pick) {\n        int winners = 0;\n        Map<Integer, Map<Integer, Integer>> playerBallCount = new HashMap<>();\n\n        // Iterate through each pick\n        for (int[] p : pick) {\n            int player = p[0];\n            int color = p[1];\n\n            // Initialize player\'s color count map if it doesn\'t exist\n            playerBallCount.putIfAbsent(player, new HashMap<>());\n            Map<Integer, Integer> colorCount = playerBallCount.get(player);\n\n            // Increment the count of the picked color\n            colorCount.put(color, colorCount.getOrDefault(color, 0) + 1);\n        }\n\n        // Determine winners\n        for (Map.Entry<Integer, Map<Integer, Integer>> entry : playerBallCount.entrySet()) {\n            int player = entry.getKey();\n            Map<Integer, Integer> colorCount = entry.getValue();\n            \n            // Check if the current player meets the win condition\n            for (int count : colorCount.values()) {\n                if (count > player) {\n                    winners++;\n                    break;\n                }\n            }\n        }\n\n        return winners;\n\n    }\n}\n```
['Array', 'Java']