package leetcode;

/**
 * https://leetcode.com/problems/patching-array/
 */
public class Problem330 {
    public int minPatches(int[] nums, int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem330 prob = new Problem330();
        System.out.println(prob.minPatches(new int[]{1, 3}, 6)); // 1
        prob.minPatches(new int[]{1, 5, 10}, 20); // 2
        prob.minPatches(new int[]{1, 2, 2}, 5); // 0
    }
}

@@ -342,32 +342,51 @@
 ); // 1%0A        
+System.out.println(
 prob.minPatches(
@@ -409,16 +409,17 @@
 10%7D, 20)
+)
 ; // 2%0A 
@@ -425,16 +425,35 @@
         
+System.out.println(
 prob.min
@@ -482,16 +482,17 @@
 , 2%7D, 5)
+)
 ; // 0%0A 

Update problem 330