Skip to content

Commit 7c9928c

Browse files
add 1295 tests
1 parent 3ad2047 commit 7c9928c

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-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+
|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||
1112
|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||
1213
|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||
1314
|1282|[Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1282.java) | | | [:tv:](https://www.youtube.com/watch?v=wGgcRCpSAa8)|Medium||
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._1295;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _1295Test {
10+
private static _1295.Solution1 solution1;
11+
private static _1295.Solution2 solution2;
12+
13+
@BeforeClass
14+
public static void setup() {
15+
solution1 = new _1295.Solution1();
16+
solution2 = new _1295.Solution2();
17+
}
18+
19+
@Test
20+
public void test1() {
21+
assertEquals(2, solution1.findNumbers(new int[]{12, 345, 2, 6, 7896}));
22+
assertEquals(2, solution2.findNumbers(new int[]{12, 345, 2, 6, 7896}));
23+
}
24+
25+
@Test
26+
public void test2() {
27+
assertEquals(1, solution1.findNumbers(new int[]{555, 901, 482, 1771}));
28+
assertEquals(1, solution2.findNumbers(new int[]{555, 901, 482, 1771}));
29+
}
30+
31+
}

0 commit comments

Comments
 (0)