File tree 2 files changed +36
-1
lines changed
main/java/com/fishercoder/solutions
test/java/com/fishercoder
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 26
26
public class _90 {
27
27
28
28
public static class Solution1 {
29
- public static List <List <Integer >> subsetsWithDup (int [] nums ) {
29
+ public List <List <Integer >> subsetsWithDup (int [] nums ) {
30
30
List <List <Integer >> result = new ArrayList ();
31
31
List <Integer > empty = new ArrayList ();
32
32
result .add (empty );
Original file line number Diff line number Diff line change
1
+ package com .fishercoder ;
2
+
3
+ import com .fishercoder .common .utils .CommonUtils ;
4
+ import com .fishercoder .solutions ._90 ;
5
+ import org .junit .BeforeClass ;
6
+ import org .junit .Test ;
7
+
8
+ public class _90Test {
9
+ private static _90 .Solution1 solution1 ;
10
+ private static _90 .Solution2 solution2 ;
11
+ private static _90 .Solution3 solution3 ;
12
+
13
+ @ BeforeClass
14
+ public static void setup () {
15
+ solution1 = new _90 .Solution1 ();
16
+ solution2 = new _90 .Solution2 ();
17
+ solution3 = new _90 .Solution3 ();
18
+ }
19
+
20
+ @ Test
21
+ public void test1 () {
22
+ CommonUtils .printListList (solution1 .subsetsWithDup (new int []{1 , 2 , 2 }));
23
+ }
24
+
25
+ @ Test
26
+ public void test2 () {
27
+ CommonUtils .printListList (solution2 .subsetsWithDup (new int []{1 , 2 , 2 }));
28
+ }
29
+
30
+ @ Test
31
+ public void test3 () {
32
+ CommonUtils .printListList (solution3 .subsetsWithDup (new int []{1 , 2 , 2 }));
33
+ }
34
+
35
+ }
You can’t perform that action at this time.
0 commit comments