Practice Find Common Characters
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
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.
Source: Find Common Characters on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
words = ["bella","label","roller"]
Output
["e","l","l"]
# Example 2
Input
words = ["cool","lock","cook"]
Output
["c","o"]
Constraints
1 <= words.length <= 100
1 <= words[i].length <= 100
words[i] consists of lowercase English letters.
Related LeetCode Problems
Practice more problems similar to Find Common Characters.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.