Intersection of Two Arrays Solutions in GoNumber 349Difficulty EasyAcceptance 62.6%Link LeetCodeOther languages C++, JavaSolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func intersection(nums1 []int, nums2 []int) []int { m := map[int]bool{} var res []int for _, n := range nums1 { m[n] = true } for _, n := range nums2 { if m[n] { delete(m, n) res = append(res, n) } } return res}package leetcode func intersection(nums1 []int, nums2 []int) []int { m := map[int]bool{} var res []int for _, n := range nums1 { m[n] = true } for _, n := range nums2 { if m[n] { delete(m, n) res = append(res, n) } } return res }