FunctionRacerProblemsRace

Find Common Characters

EasyHash mapsPython, JavaScript, TypeScript, Java, C++

Return the single characters that appear in every word of words. If a character appears 3 times in every word, it must be in the answer 3 times. Return the characters in alphabetical order, as a list of one-letter strings.

Example 1

words ["bella","label","roller"]
returns ["e","l","l"]

e once, l twice: [e, l, l].

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Hash maps problems