filmov
tv
Given a pair of non-empty strings. Count the number of matching characters in those strings

Показать описание
Given a pair of non-empty strings. Count the number of matching characters in those strings (consider the single count for the character which have duplicates in the strings).
Examples:
Input : strl = 'abodef
str2 = 'defghia'
Output : 4
(i.e. matching characters :- a, d, e, f)
Input : strI = 'aabeddeklli2@'
Output : 5
(i.e. matching characters :- b, 1, 2, @, k)
Examples:
Input : strl = 'abodef
str2 = 'defghia'
Output : 4
(i.e. matching characters :- a, d, e, f)
Input : strI = 'aabeddeklli2@'
Output : 5
(i.e. matching characters :- b, 1, 2, @, k)