11package com .thealgorithms .slidingwindow ;
22
33import static org .junit .jupiter .api .Assertions .assertEquals ;
4+
45import org .junit .jupiter .api .Test ;
56
67/**
@@ -40,7 +41,7 @@ void testMaxSumKSizeSubarrayWithInsufficientElements() {
4041 int [] arr = {1 , 2 };
4142 int k = 3 ; // Not enough elements
4243 int expectedMaxSum = -1 ; // Edge case
43- assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
44+ assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
4445 }
4546
4647 /**
@@ -62,7 +63,7 @@ void testMaxSumKSizeSubarrayWithNegativeNumbers() {
6263 int [] arr = {-1 , -2 , -3 , -4 , -5 };
6364 int k = 2 ;
6465 int expectedMaxSum = -3 ; // -1 + -2
65- assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
66+ assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
6667 }
6768
6869 /**
@@ -73,6 +74,6 @@ void testMaxSumKSizeSubarrayWithKEqualToArrayLength() {
7374 int [] arr = {1 , 2 , 3 , 4 , 5 };
7475 int k = 5 ;
7576 int expectedMaxSum = 15 ; // 1 + 2 + 3 + 4 + 5
76- assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
77+ assertEquals (expectedMaxSum , SlidingWindow .maxSumKSizeSubarray (arr , k ));
7778 }
7879}
0 commit comments