package leetcode;

/**
 * https://leetcode.com/problems/minimum-number-of-frogs-croaking/
 */
public class Problem1419 {
    public int minNumberOfFrogs(String croakOfFrogs) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1419 prob = new Problem1419();
        System.out.println(prob.minNumberOfFrogs("croakcroak")); // 1
        System.out.println(prob.minNumberOfFrogs("crcoakroak")); // 2
        System.out.println(prob.minNumberOfFrogs("croakcrook")); // -1
        System.out.println(prob.minNumberOfFrogs("croakcroa")); // -1
    }
}

@@ -165,24 +165,104 @@
 kOfFrogs) %7B%0A
+        int answer = 0;%0A        for (char c : croakOfFrogs.toCharArray()) %7B%0A    
         // T
@@ -265,16 +265,26 @@
 // TODO%0A
+        %7D%0A
         
@@ -290,17 +290,22 @@
  return 
-0
+answer
 ;%0A    %7D%0A
@@ -673,20 +673,171 @@
 a%22)); // -1%0A
+        System.out.println(prob.minNumberOfFrogs(%22cccrrroooaaakkk%22)); // 3%0A        System.out.println(prob.minNumberOfFrogs(%22cccrrraooaoakkk%22)); // -1%0A
     %7D%0A%7D%0A

Update problem 1419