We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 947ff7f commit 8d068c8Copy full SHA for 8d068c8
data_structures/sliding_window/fixed_size_window.py
@@ -42,7 +42,7 @@ def max_sum_subarray(arr: list[int], k: int) -> int:
42
if len(arr) < k:
43
raise ValueError("Array length must be at least as large as the window size.")
44
45
- max_sum = float('-inf')
+ max_sum = float("-inf")
46
window_sum = sum(arr[:k])
47
max_sum = max(max_sum, window_sum)
48
0 commit comments