Simple java solution using 2d matrix beats 100%
Intuition\ncreate a new 2d array of n rows and 11 columns \nwhy 11 columns? given in constraint that number of balls 0 to 10\nincrement tha count of cell with i
# Intuition\ncreate a new 2d array of n rows and 11 columns \nwhy 11 columns? given in constraint that number of balls 0 to 10\nincrement tha count of cell with index mat [ pick[i][0] , pick[i][1] ]\nwhenever we encounter count > that row increment answer else break the loop to overcome repitive counting of same player\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(pick.length() + 11*n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(11*n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public int winningPlayerCount(int n, int[][] pick) {\n        int ans=0;\n        int mat[][]=new int[n][11];\n        for(int i=0;i<pick.length;i++)\n        {\n               int x=pick[i][0];\n               int y=pick[i][1];\n               mat[x][y]++;\n            \n        }\n        int c=0;\n        for(int i=0;i<n;i++)\n        {\n            for(int j=0;j<11;j++)\n            {\n                if(mat[i][j]>i) {\n                    c++;\n                    break;\n                }\n            }\n        }\n        return c;\n    }\n}\n```
['Java']