N-Repeated Element in Size 2N Array Solutions in GoNumber 961Difficulty EasyAcceptance 73.8%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func repeatedNTimes(A []int) int { kv := make(map[int]struct{}) for _, val := range A { if _, ok := kv[val]; ok { return val } kv[val] = struct{}{} } return 0}package leetcode func repeatedNTimes(A []int) int { kv := make(map[int]struct{}) for _, val := range A { if _, ok := kv[val]; ok { return val } kv[val] = struct{}{} } return 0 }