Straight forward Map Implementation
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nMake the key of the has
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nMake the key of the hashmap the player, and the index be the color and value of that index be the count of the ball of that color.\n\n# Complexity\n- Time complexity: O(n)\nLoops might make it seems like $$O(n^2)$$ but from the constriant it is just O(11n) at max for insertion. We loop through the pick data structure which is O(n) time.\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```golang []\nfunc winningPlayerCount(n int, pick [][]int) int {\n\tplayer_color := make(map[int][]int)\n\n\tfor x := 0; x < n; x++ {\n\t\tfor y := 0; y <= 10; y++ {\n\t\t\tplayer_color[x] = append(player_color[x], 0)\n\t\t}\n\t}\n\n\tfor i := 0; i < len(pick); i++ {\n\t\tx := pick[i][0]\n\t\ty := pick[i][1]\n\t\tplayer_color[x][y]++\n\t}\n\n\tcount := 0\n\n\tfor key, val := range player_color {\n\t\tfor i := 0; i < len(val); i++ {\n\t\t\tif val[i] > key {\n\t\t\t\tcount++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t//key - player && index - color && value - count of that color\n\t//if any element value is more than index of that player they win\n\n\treturn count\n}\n```
['Go']