-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest0442.java
More file actions
29 lines (22 loc) · 709 Bytes
/
Copy pathTest0442.java
File metadata and controls
29 lines (22 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package leetcode;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2020/1/11
*/
class Test0442 {
private final Solution0442 solution = new Solution0442();
@Test
@DisplayName("442 Find All Duplicates in an Array")
void findDuplicates() {
int[] nums = {4, 3, 2, 7, 8, 2, 3, 1};
List<Integer> expected = Arrays.asList(3, 2);
assertEquals(expected, solution.findDuplicates(nums));
}
}