Skip to content

Commit d69fba7

Browse files
add 1297 tests
1 parent 950271d commit d69fba7

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Time | Space | Video | Difficulty | Tag
1010
|-----|----------------|---------------|---------------|---------------|--------|-------------|-------------
11+
|1297|[Maximum Number of Occurrences of a Substring](https://leetcode.com/problems/maximum-number-of-occurrences-of-a-substring/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1297.java) | | | |Medium||
1112
|1296|[Divide Array in Sets of K Consecutive Numbers](https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1296.java) | | | |Medium||
1213
|1295|[Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1295.java) | | | |Easy||
1314
|1290|[Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1290.java) | | | |Easy||
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._1297;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _1297Test {
10+
private static _1297.Solution1 solution1;
11+
12+
@BeforeClass
13+
public static void setup() {
14+
solution1 = new _1297.Solution1();
15+
}
16+
17+
@Test
18+
public void test1() {
19+
assertEquals(2, solution1.maxFreq("aababcaab", 2, 3, 4));
20+
}
21+
22+
@Test
23+
public void test2() {
24+
assertEquals(2, solution1.maxFreq("aaaa", 1, 3, 3));
25+
}
26+
27+
@Test
28+
public void test3() {
29+
assertEquals(3, solution1.maxFreq("aabcabcab", 2, 2, 3));
30+
}
31+
32+
@Test
33+
public void test4() {
34+
assertEquals(0, solution1.maxFreq("abcde", 2, 3, 3));
35+
}
36+
37+
}

0 commit comments

Comments
 (0)