package leetcode;

/**
 * https://leetcode.com/problems/number-of-matching-subsequences/
 */
public class Problem792 {
    public int numMatchingSubseq(String S, String[] words) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem792 prob = new Problem792();
        System.out.println(prob.numMatchingSubseq("abcde", new String[]{"a", "bb", "acd", "ace"})); // 3
    }
}

@@ -185,15 +185,571 @@
     
-// TODO
+int result = 0;%0A        for (String word : words) %7B%0A            int i = 0;%0A            int j = 0;%0A            int count = 0;%0A            for (; i %3C word.length(); i++) %7B%0A                while (j %3C S.length()) %7B%0A                    if (word.charAt(i) == S.charAt(j++)) %7B%0A                        count++;%0A                        break;%0A                    %7D%0A                %7D%0A                if (j == S.length()) %7B%0A                    break;%0A                %7D%0A            %7D%0A            if (count == word.length()) %7B%0A                result++;%0A            %7D%0A        %7D
 %0A   
@@ -760,17 +760,22 @@
  return 
-0
+result
 ;%0A    %7D%0A

Update problem 792