2828. Check if a String Is an Acronym of Words
Given an array of strings
words
and a strings
, determine ifs
is an acronym of words.The string
s
is considered an acronym ofwords
if it can be formed by concatenating the first character of each string inwords
in order. For example,"ab"
can be formed from["apple", "banana"]
, but it can’t be formed from["bear", "aardvark"]
.Return
true
ifs
is an acronym ofwords
, andfalse
otherwise.
1 | class Solution { |