First Unique Character in a String Solutions in GoNumber 387Difficulty EasyAcceptance 53.4%Link LeetCodeOther languages C++, JavaSolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func firstUniqChar(s string) int { result := make([]int, 26) for i := 0; i < len(s); i++ { result[s[i]-'a']++ } for i := 0; i < len(s); i++ { if result[s[i]-'a'] == 1 { return i } } return -1}package leetcode func firstUniqChar(s string) int { result := make([]int, 26) for i := 0; i < len(s); i++ { result[s[i]-'a']++ } for i := 0; i < len(s); i++ { if result[s[i]-'a'] == 1 { return i } } return -1 }