Java beats 100%
IntuitionJust counting colors for each player.ApproachUse 2d array instead of maps for colors counts.
Stop counting colors for player who already won.Complexity
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Just counting colors for each player.

# Approach
<!-- Describe your approach to solving the problem. -->
Use 2d array instead of maps for colors counts.
Stop counting colors for player who already won.

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
 $$O(n)$$

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
 $$O(n)$$

# Code
```java []
class Solution {

    private static final int WINNER_FLAG_INDEX = 11;

    public int winningPlayerCount(int n, int[][] pick) {
        int winners = 0;
        var picks = new int[n][12];
        for (int p = 0; p < pick.length; p++) {
            int player = pick[p][0];
            int color = pick[p][1];
            if (picks[player][WINNER_FLAG_INDEX] > 0) {
                // already winner -> ignore
                continue;
            }
            if (picks[player][color] + 1 > player) {
                // add winner
                winners += 1;
                picks[player][WINNER_FLAG_INDEX] = 1;
            } else {
                // continue count colors
                picks[player][color] += 1;
            }
        }
        return winners;
    }
}
```
['Java']