You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
lavos/cap3/ex23.go

18 lines
300 B

package cap3
type Pair struct {
first, second int
}
func Ex23(nums []int) [][]int {
countMap := _makeMatrix(10)
for _, num1 := range nums {
for _, num2 := range nums {
countMap[num1][num2]++
countMap[num2][num1]++
}
}
return countMap
}