코딩테스트/LeetCode
2022. 7. 20.
[LeetCode] Number Of Matching Subsequences
문제링크 Number of Matching Subsequences - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 주어진 문자열 s를 통해 만들 수 있는 words 문자열의 개수를 구하는 문제 조건 : 꼭 연결된 문자열이 아니여도 된다. (s = "abcde" words = ["ace"] 면 가능한 경우) 접근 방법 s = "abcde" word = "ace" 인 경우 s[i] === word[j] 일때 i++, j++; s[i] !== word[j] 일때 i..