Problem List

Check if a String Is an Acronym of Words

June 02, 2025Go array, stringeasy

Problem

Go Solution
func isAcronym(words []string, s string) bool {
    if len(words) != len(s) {
        return false
    }

    for i := range words {
        if words[i][0] != s[i] {
            return false
        }
    }
    return true
}
LeetCode Problem Link