Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    1002 - Find Common Characters\.

    Easy

    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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Solution()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<String> commonChars(Array<String> words)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait