package leetcode;

import java.util.Arrays;

/**
 * https://leetcode.com/problems/moving-stones-until-consecutive-ii/
 */
public class Problem1040 {
    public int[] numMovesStonesII(int[] stones) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1040 prob = new Problem1040();
        System.out.println(Arrays.toString(prob.numMovesStonesII(new int[]{7, 4, 9}))); // [1,2]
        System.out.println(Arrays.toString(prob.numMovesStonesII(new int[]{6, 5, 4, 3, 10}))); // [2,3]
        System.out.println(Arrays.toString(prob.numMovesStonesII(new int[]{100, 101, 104, 102, 103}))); // [0,0]
    }
}

@@ -641,16 +641,217 @@
 / %5B0,0%5D%0A
+        System.out.println(Arrays.toString(prob.numMovesStonesII(new int%5B%5D%7B1, 2, 5%7D))); // %5B2,2%5D%0A        System.out.println(Arrays.toString(prob.numMovesStonesII(new int%5B%5D%7B1, 3, 5, 7, 10%7D))); // %5B2,4%5D%0A
     %7D%0A%7D%0A

Update problem 1040