Sliding window max (peeked a bit)

This commit is contained in:
2023-10-31 00:58:52 -04:00
parent 01a189c5ee
commit cb68a35b1b
4 changed files with 39 additions and 31 deletions
+7 -1
View File
@@ -1,3 +1,5 @@
import json
import pytest
import stuff
@@ -465,7 +467,11 @@ def test_trie_busy():
[-2, 1],
1,
),
(
json.load(open(".testdata/max_sub_array0.json")),
11081,
),
],
)
def test_maximum_subarray(nums: list[int], expected: int):
def test_max_sub_array(nums: list[int], expected: int):
assert stuff.sum_max_sub_array(nums) == expected