#916
Word Subsets
specialist · 785 · lc medium +31 · 55.9% accepted · 3,533 likes · top 49%
Description
Given two string arrays words1 and words2, a word from words1 is universal if every word in words2 is a character-frequency subset of it (the word contains at least as many of each letter). Return all universal words from words1 in any order.
Code
1
2
3