package main

import "fmt"

func main() {

initArr := []int{1,2,3,4,1,1,4,2,5}
fmt.Println(initArr)

CountStrg := make(map[int]int)

for _,val := range initArr {
	// fmt.Printf("Key is %d and val is %d\n",key, val)
	if _,ok := CountStrg[val]; !ok {
		CountStrg[val] = 1
		continue
	}
	CountStrg[val]++
}
fmt.Println(CountStrg)
fmt.Print("==========================\n")
fmt.Println("Len of slice is: ",len(initArr)," and capacity is ",cap(initArr))
initArr = append(initArr, 10)
fmt.Print("==========================\n")
fmt.Println("New len of slice is: ",len(initArr)," and new capacity is ",cap(initArr))
}