Uncommon Words from Two Sentences Solutions in GoNumber 884Difficulty EasyAcceptance 63.4%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode import "strings" func uncommonFromSentences(A string, B string) []string { m, res := map[string]int{}, []string{} for _, s := range []string{A, B} { for _, word := range strings.Split(s, " ") { m[word]++ } } for key := range m { if m[key] == 1 { res = append(res, key) } } return res}package leetcode import "strings" func uncommonFromSentences(A string, B string) []string { m, res := map[string]int{}, []string{} for _, s := range []string{A, B} { for _, word := range strings.Split(s, " ") { m[word]++ } } for key := range m { if m[key] == 1 { res = append(res, key) } } return res }