Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9703543

Browse files
add test for 1679
1 parent 7933847 commit 9703543

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._1679;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _1679Test {
10+
private static _1679.Solution1 solution1;
11+
private static int[] nums;
12+
private static int k;
13+
14+
@BeforeClass
15+
public static void setup() {
16+
solution1 = new _1679.Solution1();
17+
}
18+
19+
@Test
20+
public void test1() {
21+
nums = new int[]{2, 5, 4, 4, 1, 3, 4, 4, 1, 4, 4, 1, 2, 1, 2, 2, 3, 2, 4, 2};
22+
k = 3;
23+
assertEquals(4, solution1.maxOperations(nums, k));
24+
}
25+
26+
}

0 commit comments

Comments
 (0)