Leetcode Problem 2828. Check if a String Is an Acronym of Words
2828. Check if a String Is an Acronym of Words
Leetcode Solutions
Check Acronym by Comparing First Characters
Check if the length of s is equal to the number of words. If not, return false.
Initialize an index i to 0.
Iterate through each word in the list of words.
a. If the first character of the current word does not match the character at index i of s, return false.
b. Increment i.
If the loop completes without returning false, return true.