Skip to content

Commit 8845666

Browse files
committed
Added test for MinimumWindowSubstring
1 parent 9826b84 commit 8845666

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.thealgorithms.strings;
2+
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import org.junit.jupiter.api.Test;
5+
6+
public class MinimumWindowSubstringTest {
7+
8+
@Test
9+
public void testExample1() {
10+
assertEquals("BANC", MinimumWindowSubstring.minWindow("ADOBECODEBANC", "ABC"));
11+
}
12+
13+
@Test
14+
public void testExample2() {
15+
assertEquals("", MinimumWindowSubstring.minWindow("A", "AA"));
16+
}
17+
18+
@Test
19+
public void testExample3() {
20+
assertEquals("a", MinimumWindowSubstring.minWindow("a", "a"));
21+
}
22+
23+
@Test
24+
public void testExample4() {
25+
assertEquals("t stri", MinimumWindowSubstring.minWindow("test string", "tist"));
26+
}
27+
}

0 commit comments

Comments
 (0)