-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest1053.java
More file actions
35 lines (25 loc) · 890 Bytes
/
Test1053.java
File metadata and controls
35 lines (25 loc) · 890 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
30
31
32
33
34
35
package leetcode;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2019/10/22
*/
class Test1053 {
private final Solution1053 solution = new Solution1053();
@Test
void testSolution1053() {
int[] input = {3, 2, 1};
int[] output = {3, 1, 2};
assertArrayEquals(output, solution.prevPermOpt1(input));
input = new int[]{1, 1, 5};
output = new int[]{1, 1, 5};
assertArrayEquals(output, solution.prevPermOpt1(input));
input = new int[]{1, 9, 4, 6, 7};
output = new int[]{1, 7, 4, 6, 9};
assertArrayEquals(output, solution.prevPermOpt1(input));
input = new int[]{3, 1, 1, 3};
output = new int[]{1, 3, 1, 3};
assertArrayEquals(output, solution.prevPermOpt1(input));
}
}