Algorithms
Easy
2828
2977
Check if a String Is an Acronym of Words
check-if-a-string-is-an-acronym-of-words
"""
Given an array of strings words and a string s, determine if s is an acronym of words.

The string s is considered an acronym of words if it can be formed by concatenating the first character of each string in words in order. For example, "ab" can be formed from ["apple", "banana"], but it can't be formed from ["bear", "aardvark"].

Return true if s is an acronym of words, and false otherwise.

Example 1:

Input: words = ["alice","bob","charlie"], s = "abc"
Output: true
Explanation: The first character in the words "alice", "bob", and "charlie" are 'a', 'b', and 'c', respectively. Hence, s = "abc" is the acronym.

Example 2:

Input: words = ["an","apple"], s = "a"
Output: false
Explanation: The first character in the words "an" and "apple" are 'a' and 'a', respectively.
The acronym formed by concatenating these characters is "aa".
Hence, s = "a" is not the acronym.

Example 3:

Input: words = ["never","gonna","give","up","on","you"], s = "ngguoy"
Output: true
Explanation: By concatenating the first character of the words in the array, we get the string "ngguoy".
Hence, s = "ngguoy" is the acronym.


Constraints:

 * 1 <= words.length <= 100
 * 1 <= words[i].length <= 10
 * 1 <= s.length <= 100
 * words[i] and s consist of lowercase English letters.
"""
class Solution:
    def isAcronym(self, words: List[str], s: str) -> bool:
        
Given an array of strings words and a string s, determine if s is an acronym of words.

The string s is considered an acronym of words if it can be formed by concatenating the first character of each string in words in order. For example, "ab" can be formed from ["apple", "banana"], but it can't be formed from ["bear", "aardvark"].

Return true if s is an acronym of words, and false otherwise.

Example 1:

Input: words = ["alice","bob","charlie"], s = "abc"
Output: true
Explanation: The first character in the words "alice", "bob", and "charlie" are 'a', 'b', and 'c', respectively. Hence, s = "abc" is the acronym.

Example 2:

Input: words = ["an","apple"], s = "a"
Output: false
Explanation: The first character in the words "an" and "apple" are 'a' and 'a', respectively.
The acronym formed by concatenating these characters is "aa".
Hence, s = "a" is not the acronym.

Example 3:

Input: words = ["never","gonna","give","up","on","you"], s = "ngguoy"
Output: true
Explanation: By concatenating the first character of the words in the array, we get the string "ngguoy".
Hence, s = "ngguoy" is the acronym.


Constraints:

 * 1 <= words.length <= 100
 * 1 <= words[i].length <= 10
 * 1 <= s.length <= 100
 * words[i] and s consist of lowercase English letters.


Please complete the code below to solve above prblem:
```python
class Solution:
    def isAcronym(self, words: List[str], s: str) -> bool:
        
```

my_solution = Solution()

test_input = { "words": ["an","apple"], "s": "a" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["alice","bob","charlie"], "s": "abc" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["never","gonna","give","up","on","you"], "s": "ngguoy" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ad","uadhrwxki"], "s": "au" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["afqcpzsx","icenu"], "s": "yi" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["afkc","icxufam"], "s": "ai" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ahbibag","aoximesw"], "s": "aa" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["auqoc","koioxa"], "s": "ak" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["b","x"], "s": "bx" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["c","df"], "s": "bd" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["dv","g"], "s": "sg" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["dvn","acafe"], "s": "dp" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["bpctc","kaqquqbpmw"], "s": "bk" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["c","evlvvhrsqa"], "s": "ce" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["dwrvgkxdtm","wy"], "s": "hw" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["eceekigel","gmgdfvsrkw"], "s": "wg" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["cfsrsyt","md"], "s": "cm" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["envpklvi","jpymde"], "s": "en" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["espleklys","dg"], "s": "ea" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["euptjhixnu","fwci"], "s": "kf" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["ddnlfpvy","exs"], "s": "de" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["deacf","hldiauk"], "s": "dh" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["dllcn","tnzrnzypg"], "s": "dt" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["dmekslxlpo","wqdgxqwdk"], "s": "dw" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["eyzywjsxza","jxeimcc"], "s": "ex" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["f","oylvtltvo"], "s": "ho" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["eo","e"], "s": "ee" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["eucvcqdgg","qtdwhygerb"], "s": "eq" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["fnpow","ysqwqli"], "s": "jy" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["gpqyvv","kihi"], "s": "ik" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["exrgiw","irexgmrl"], "s": "ei" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ez","acnmits"], "s": "ea" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["fvkekkv","jfbv"], "s": "fj" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["kncge","nje"], "s": "kw" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["fyocwzlz","lz"], "s": "fl" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["mnh","clep"], "s": "pc" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["mnpdwq","hziusbxr"], "s": "mg" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["g","r"], "s": "gr" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["n","fddigeie"], "s": "hf" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["gle","irt"], "s": "gi" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["h","xhtkcj"], "s": "hx" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["n","ityua"], "s": "ei" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["nmxysdim","xnpqsauh"], "s": "ne" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["ovdhflcck","ndd"], "s": "oi" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["piiyodecdf","wdwfxsjfou"], "s": "pp" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["hdmwkr","jfrqh"], "s": "hj" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["hflf","fvnotmdcpw"], "s": "hf" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["hnwphhozqw","cfhsjlqj"], "s": "hc" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["pxcsaaa","lrvxsc"], "s": "pz" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["htlsq","y"], "s": "hy" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["iakfeop","pd"], "s": "ip" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["qir","qyyzmntl"], "s": "qa" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["iakfmr","gzggxzwor"], "s": "ig" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["jna","rjdbu"], "s": "jr" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["qunqyc","ouzjotitvn"], "s": "co" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["rdednrsn","yfrgdeapme"], "s": "ny" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["rtnbfaemv","kgpcwaoik"], "s": "rf" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["s","n"], "s": "sx" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["siiyqtkyis","mogzgabcgk"], "s": "fm" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["tit","pmuqzrs"], "s": "tz" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["uip","hhstwupgg"], "s": "eh" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["uyj","jlfnksqlt"], "s": "ur" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["kabfejv","g"], "s": "kg" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["w","eshensjifo"], "s": "ez" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["khhhdsaevp","dnod"], "s": "kd" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["wefmc","tmunsmg"], "s": "jt" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["wo","jhaabx"], "s": "wx" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["kltil","mubemf"], "s": "km" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["kxkvhylsh","gyshntskq"], "s": "kg" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["wseopbedw","iihrgujev"], "s": "wq" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["kzxp","fy"], "s": "kf" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["wvdx","jerzn"], "s": "cj" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["y","qppnclhhbd"], "s": "mq" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["yegnsnddq","kusrkz"], "s": "bk" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["couqsa","sncuru","jhgxpxipg"], "s": "csa" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["csm","hexhvojfj","l"], "s": "chh" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["lbor","zx"], "s": "lz" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["losinu","ptsjoihvj"], "s": "lp" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["maczdfm","ywj"], "s": "my" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["d","geviina","tyljs"], "s": "dvt" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["mammhva","igyzbwpj"], "s": "mi" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ecmlkida","vrjwdpe","vocff"], "s": "hvv" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["emqlklvrw","das","bzuq"], "s": "edm" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["hawikjbs","qi","ssvgttkzd"], "s": "rornirdphvargyce" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["hd","f","meivn"], "s": "hpm" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["mqhptbyzzv","mfubjraiqz"], "s": "mm" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["mvftnzftb","ga"], "s": "mg" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ncgutvi","rsh"], "s": "nr" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ntf","txayzc"], "s": "nt" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["nubibbe","wzwdrjcck"], "s": "nw" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["hphfek","kezkkq","oh"], "s": "hmo" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["odtclcvcj","ufhrhk"], "s": "ou" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ojcn","naujlz"], "s": "on" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["iho","ignyipken","q"], "s": "wiq" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["olynt","xf"], "s": "ox" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["ir","wzhmxee","kjfwful"], "s": "iwn" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["ixo","wigba","raaphui"], "s": "dwr" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["opup","eme"], "s": "oe" }
assert my_solution.isAcronym(**test_input) == True

test_input = { "words": ["kmmoq","aoh","hznkpurdh"], "s": "kar" }
assert my_solution.isAcronym(**test_input) == False

test_input = { "words": ["ottxwi","akpixfvbel"], "s": "oa" }
assert my_solution.isAcronym(**test_input) == True