-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest0049.java
More file actions
27 lines (20 loc) · 714 Bytes
/
Test0049.java
File metadata and controls
27 lines (20 loc) · 714 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
package leetcode;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2019/12/16
*/
class Test0049 {
private final Solution0049 solution = new Solution0049();
@Test
@DisplayName("49 Group Anagrams")
void groupAnagrams() {
List<List<Object>> expected = Arrays.asList(Arrays.asList("eat", "tea", "ate"), Arrays.asList("tan", "nat"), Arrays.asList("bat"));
String[] input = {"eat", "tea", "tan", "ate", "nat", "bat"};
assertEquals(expected, solution.groupAnagrams(input));
}
}