Iterative Java Solution
class Solution {     public int numMatchingSubseq(String S, String[] words) {         int count = 0;         for (String w : words) {             int i = 0;   /
```
class Solution {
    public int numMatchingSubseq(String S, String[] words) {
        int count = 0;
        for (String w : words) {
            int i = 0;   // word index
            int j = 0;   // S index
            while (j < S.length() && i < w.length()) {
                if (S.charAt(j) == w.charAt(i)) {
                    j ++;
                    i ++;
                } else {
                    j ++;
                }
            }
            if (i == w.length()) count ++;
        }
        return count;
    }
}
```
[]