Given stringSand a dictionary of wordswords, find the number ofwords[i]that is a subsequence ofS.
Example :
Input: S = "abcde"
words = ["a", "bb", "acd", "ace"]
Output: 3
Explanation:
There are three words in words that are a subsequence of S: "a", "acd", "ace".
Note:
All words inwordsandSwill only consists of lowercase letters.
The length ofSwill be in the range of[1, 50000].
The length ofwordswill be in the range of [1, 5000].
The length ofwords[i]will be in the range of[1, 50].