@Test(timeout = 2000) public void randomTest() { Random r = new Random(); for (int j = 1; j <= 10; j++) { int N = 3000 * j; int[] arr = new int[N]; for (int i = 0; i < arr.length; i++) arr[i] = ((-N / 2) + r.nextInt(N)) / (j * j * j); int expect = reversePairs(arr); Assert.assertEquals(expect, countInversion.solve(arr)); } }
public int solve(int[] arr) { return -1; }
CountInversion { public int solve(int[] arr) { return -1; } }
CountInversion { public int solve(int[] arr) { return -1; }  }
CountInversion { public int solve(int[] arr) { return -1; }  int solve(int[] arr); }
CountInversion { public int solve(int[] arr) { return -1; }  int solve(int[] arr);  }