#1002
Find Common Characters
easy · verified · 74.7% accepted · 4,509 likes · top 85%
array · hash table · string
Description
Given a string array words, return an array of all characters that show up in all strings within the words (including duplicates). You may return the answer in any order.
Example 1:
Input: words = ["bella","label","roller"]
Output: ["e","l","l"]
Example 2:
Input: words = ["cool","lock","cook"]
Output: ["c","o"]
Solution