We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8139629 commit c1f52e9Copy full SHA for c1f52e9
src/main/java/com/thealgorithms/slidingwindow/MinSumKSizeSubarray.java
@@ -1,5 +1,4 @@
1
package com.thealgorithms.slidingwindow;
2
-
3
/**
4
* The Sliding Window algorithm is used to find the minimum sum of a subarray
5
* of a fixed size k within a given array.
@@ -18,7 +17,7 @@
18
17
public final class MinSumKSizeSubarray {
19
20
// Prevent instantiation
21
- private MinSumKSizeSubarray() {
+ private MinSumKSizeSubarray() {
22
}
23
24
@@ -28,7 +27,6 @@ private MinSumKSizeSubarray() {
28
27
* @param k is the size of the subarray
29
* @return the minimum sum of the subarray of size k
30
*/
31
32
public static int minSumKSizeSubarray(int[] arr, int k) {
33
if (arr.length < k) {
34
return -1; // Edge case: not enough elements
0 commit comments