[Algorithm] 10 week(3.14 ~ 3.20) 3/3

Dev_min·2022년 3월 16일
0

algorithm

목록 보기
34/157

1967. Number of Strings That Appear as Substrings in Word

var numOfStrings = function(patterns, word) {
    let result = 0; 
    patterns.forEach((pattern) => {
        if(word.match(pattern)){
            result += 1;
        }
    })
    
    return result;
};
profile
TIL record

0개의 댓글