Skip to content

Files

Latest commit

author
Shuo
Sep 2, 2021
0dfdaa8 · Sep 2, 2021

History

History

find-common-characters

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 2, 2021
Feb 24, 2021
Nov 15, 2019

README.md

< Previous                  Next >

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"]

 

Constraints:

  • 1 <= words.length <= 100
  • 1 <= words[i].length <= 100
  • words[i] consists of lowercase English letters.

Related Topics

[Array] [Hash Table] [String]

Similar Questions

  1. Intersection of Two Arrays II (Easy)