Skip to content

Commit d781a00

Browse files
committed
Added a test case
1 parent 160db7f commit d781a00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/leetcode/medium/MaximumProductSubarrayTest.java

+6
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ void testMaxProduct4() {
3535
int[] nums = {0, 0};
3636
assertEquals(0, maximumProductSubarray.maxProduct(nums));
3737
}
38+
39+
@Test
40+
void testMaxProduct5() {
41+
int[] nums = { 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0 };
42+
assertEquals(1000000000, maximumProductSubarray.maxProduct(nums));
43+
}
3844
}

0 commit comments

Comments
 (0)