Skip to content

Commit 504078c

Browse files
Update and rename MinimumWindowSubstring to MinimumWindowSubstring.java
1 parent 5c1fa63 commit 504078c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/main/java/com/thealgorithms/slidingwindow/MinimumWindowSubstring renamed to src/main/java/com/thealgorithms/slidingwindow/MinimumWindowSubstring.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.thealgorithms.slidingwindow;
2-
2+
import java.util.*;
33
/**
44
* The Longest Subarray with Sum Less Than or Equal to k algorithm finds the length
55
* of the longest subarray whose sum is less than or equal to a given value k.
@@ -12,7 +12,18 @@
1212
*
1313
* @author https://github.com/Chiefpatwal
1414
*/
15-
class Solution {
15+
public final class MinimumWindowSubstring {
16+
// Prevent instantiation
17+
private MinimumWindowSubstring() {
18+
}
19+
20+
/**
21+
* This method finds the minimum sum of a subarray of a given size k.
22+
*
23+
* @param arr is the input array where the minimum sum needs to be found
24+
* @param k is the size of the subarray
25+
* @return the minimum sum of the subarray of size k
26+
*/
1627
public static String minWindow(String s, String t) {
1728
if (s.length() < t.length()) return "";
1829

0 commit comments

Comments
 (0)