Given two strings, find the number of common characters between them.
Example
For s1 = "aabcc" and s2 = "adcaa", the output should becommonCharacterCount(s1, s2) = 3.
Strings have 3 common characters - 2 "a"s and 1 "c".
Code
function commonCharacterCount(s1, s2) {
}
'알고리즘(CF)' 카테고리의 다른 글
| 12. sortByHeight (1) | 2017.06.08 |
|---|---|
| 11. isLucky (1) | 2017.06.08 |
| 9. allLongestStrings (1) | 2017.06.08 |
| 8. matrixElementsSum (1) | 2017.06.08 |
| 7. almostIncreasingSequence (1) | 2017.06.07 |