Skip to content

Commit e5162e5

Browse files
add 1296 tests
1 parent 4d2cf64 commit e5162e5

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Time | Space | Video | Difficulty | Tag
1010
|-----|----------------|---------------|---------------|---------------|--------|-------------|-------------
11+
|1296|[Divide Array in Sets of K Consecutive Numbers](https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1296.java) | | | |Medium||
1112
|1295|[Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1295.java) | | | |Easy||
1213
|1290|[Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1290.java) | | | |Easy||
1314
|1287|[Element Appearing More Than 25% In Sorted Array](https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1287.java) | | | |Easy||
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._1296;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _1296Test {
10+
private static _1296.Solution1 solution1;
11+
12+
@BeforeClass
13+
public static void setup() {
14+
solution1 = new _1296.Solution1();
15+
}
16+
17+
@Test
18+
public void test1() {
19+
assertEquals(true, solution1.isPossibleDivide(new int[]{1, 2, 3, 3, 4, 4, 5, 6}, 4));
20+
}
21+
22+
@Test
23+
public void test2() {
24+
assertEquals(true, solution1.isPossibleDivide(new int[]{3, 2, 1, 2, 3, 4, 3, 4, 5, 9, 10, 11}, 3));
25+
}
26+
27+
@Test
28+
public void test3() {
29+
assertEquals(true, solution1.isPossibleDivide(new int[]{3, 3, 2, 2, 1, 1}, 3));
30+
}
31+
32+
@Test
33+
public void test4() {
34+
assertEquals(false, solution1.isPossibleDivide(new int[]{1, 2, 3, 4}, 3));
35+
}
36+
37+
}

0 commit comments

Comments
 (0)