HTMLify

LeetCode - Check if a String Is an Acronym of Words - Go
Views: 5 | Author: abh
func isAcronym(words []string, s string) bool {
    if len(words) != len(s) {
        return false
    }
    for i, c := range s {
        if byte(c) != words[i][0] {
            return false
        }
    }
    return true
}

Comments