Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9ea706

Browse files
add test for 90
1 parent480ba2b commitc9ea706

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

‎src/main/java/com/fishercoder/solutions/_90.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
publicclass_90 {
2727

2828
publicstaticclassSolution1 {
29-
publicstaticList<List<Integer>>subsetsWithDup(int[]nums) {
29+
publicList<List<Integer>>subsetsWithDup(int[]nums) {
3030
List<List<Integer>>result =newArrayList();
3131
List<Integer>empty =newArrayList();
3232
result.add(empty);
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
packagecom.fishercoder;
2+
3+
importcom.fishercoder.common.utils.CommonUtils;
4+
importcom.fishercoder.solutions._90;
5+
importorg.junit.BeforeClass;
6+
importorg.junit.Test;
7+
8+
publicclass_90Test {
9+
privatestatic_90.Solution1solution1;
10+
privatestatic_90.Solution2solution2;
11+
privatestatic_90.Solution3solution3;
12+
13+
@BeforeClass
14+
publicstaticvoidsetup() {
15+
solution1 =new_90.Solution1();
16+
solution2 =new_90.Solution2();
17+
solution3 =new_90.Solution3();
18+
}
19+
20+
@Test
21+
publicvoidtest1() {
22+
CommonUtils.printListList(solution1.subsetsWithDup(newint[]{1,2,2}));
23+
}
24+
25+
@Test
26+
publicvoidtest2() {
27+
CommonUtils.printListList(solution2.subsetsWithDup(newint[]{1,2,2}));
28+
}
29+
30+
@Test
31+
publicvoidtest3() {
32+
CommonUtils.printListList(solution3.subsetsWithDup(newint[]{1,2,2}));
33+
}
34+
35+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp