File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
src/main/java/com/thealgorithms/slidingwindow Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11package 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.
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
You can’t perform that action at this time.
0 commit comments