Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 776 Bytes

File metadata and controls

34 lines (20 loc) · 776 Bytes

Common Character Count

Given two strings, find the number of common characters between them.


Example:

  • For s1 = "aabcc" and s2 = "adcaa", the output should be commonCharacterCount(s1, s2) = 3.

Input/Output:

  • [execution time limit] 5 seconds (ts)

  • [input] string s1

    • A string consisting of lowercase English letters.
    • Guaranteed constraints:
      • $1 \le s1.length \le 15$
  • [input] string s2

    • A string consisting of lowercase English letters.
    • Guaranteed constraints:
      • $1 \le s2.length \le 15$
  • [output] integer


Solution: