madness continues

This commit is contained in:
2025-03-28 13:04:53 +00:00
parent 23e0208317
commit cabc283673
12 changed files with 156 additions and 25 deletions

16
helpers/match.go Normal file
View File

@@ -0,0 +1,16 @@
package helpers
func CountMatches(a, b []int) int {
m := make(map[int]bool)
for _, n := range b {
m[n] = true
}
match := 0
for _, n := range a {
if m[n] {
match++
}
}
return match
}