public static void main(String[] args) { AutoTestUtils.runTestClassAndPrint(MajorityNumberKPercentile.class); }
@Test public void test6() { // random number 2 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, 28, 0, 2) == 25); }
public static void main(String[] args) { AutoTestUtils.runTestClassAndPrint(Minimum_Size_Subarray_Sum.class); }
@Test public void test4() { long x = 8; // swap 0 and 1 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, x, 0, 3) == 1); }
@Test public void test5() { // random number 1 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, 47, 1, 4) == 61); }
@Test public void test3() { long x = 1; // swap 1 and 0 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, x, 0, 64) == (1 << 64)); }
@Test public void test2() { long x = 0; // no differs, all 0 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, x, 0, 64) == 0); }
@Test public void test1() { long x = 9; // no differs, all 1 for (Method m : AutoTestUtils.findMethod(methodName, c)) assertTrue(invokeMethod(m, x, 0, 3) == 9); }
public static void main(String[] args) { AutoTestUtils.runTestClassAndPrint(Q2_Swap_Bits.class); }
public static void main(String[] args) { AutoTestUtils.runTestClassAndPrint(Kth_Largest_Element_in_an_Array.class); }