package leetcode;

/**
 * https://leetcode.com/problems/task-scheduler/
 */
public class Problem621 {
    public int leastInterval(char[] tasks, int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem621 prob = new Problem621();
        System.out.println(prob.leastInterval(new char[]{'A','A','A','B','B','B'}, 2)); // 8
        System.out.println(prob.leastInterval(new char[]{'A','A','A','B','B','B'}, 1)); // 6
        System.out.println(prob.leastInterval(new char[]{'A','B','B','B'}, 2)); // 7
        System.out.println(prob.leastInterval(new char[]{'A','B','B','B'}, 1)); // 5
    }
}

@@ -463,16 +463,110 @@
 ); // 6%0A
+        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','A','A','B','B','B'%7D, 3)); // 10%0A
         
@@ -727,16 +727,522 @@
 ); // 5%0A
+        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C'%7D, 1)); // 3%0A        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C'%7D, 2)); // 3%0A        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C'%7D, 3)); // 3%0A        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C','A'%7D, 3)); // 4%0A        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C','A','C'%7D, 3)); // 6%0A        System.out.println(prob.leastInterval(new char%5B%5D%7B'A','B','C','D','C'%7D, 3)); // 5%0A
     %7D%0A%7D%0A

Update problem 621