package leetcode;

/**
 * https://leetcode.com/problems/long-pressed-name/
 */
public class Problem925 {
    public boolean isLongPressedName(String name, String typed) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem925 prob = new Problem925();
        System.out.println(prob.isLongPressedName("alex", "aaleex")); // true
        System.out.println(prob.isLongPressedName("saeed", "ssaaedd")); // false
        System.out.println(prob.isLongPressedName("leelee", "lleeelee")); // true
        System.out.println(prob.isLongPressedName("laiden", "laiden")); // true
    }
}

@@ -176,454 +176,766 @@
     
-// TODO%0A        return false;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem925 prob = new Problem925();%0A        System.out.println(prob.isLongPressedName(%22alex%22, %22aaleex%22)); // true%0A        System.out.println(prob.isLongPressedName(%22saeed%22, %22ssaaedd%22)); // false%0A        System.out.println(prob.isLongPressedName(%22leelee%22, %22lleeelee%22)); // true%0A        System.out.println(prob.isLongPressedName(%22laiden%22, %22laiden%22)); // true
+if (typed.length() %3C name.length()) %7B%0A            return false;%0A        %7D%0A        int i = 0;%0A        int j = 0;%0A        while (i %3C name.length() && j %3C typed.length()) %7B%0A            if (name.charAt(i) != typed.charAt(j)) %7B%0A                return false;%0A            %7D%0A            char c = name.charAt(i);%0A            int count1 = 1;%0A            while (i + 1 %3C name.length() && c == name.charAt(i + 1)) %7B%0A                i++;%0A                count1++;%0A            %7D%0A            int count2 = 0;%0A            while (j %3C typed.length() && c == typed.charAt(j)) %7B%0A                j++;%0A                count2++;%0A            %7D%0A            if (count1 %3E count2) %7B%0A                return false;%0A            %7D%0A            i++;%0A        %7D%0A        return i == name.length();
 %0A   

Solve problem 925