Map group count freq

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" ) func main() { arr := []int{1,2,2,4,5,5,5,5,6} mapArr := make(map[int]int) for _,val := range arr{ mapArr[val]+=1 } fmt.Println(mapArr) }
Editor Settings
Theme
Key bindings
Full width
Lines