We are given two arrays
B of words. Each word is a string of lowercase letters.
Now, say that word
b is a subset of word
a if every letter in
b occurs in
a, including multiplicity. For example,
"wrr" is a subset of
"warrior", but is not a subset of
Now say a word
A is universal if for every
b is a subset of
Return a list of all universal words in
A. You can return the words in any order.