forked from hofmannol/AlgoDatSoSe25
fixed off by one in max seq
This commit is contained in:
parent
06fa81648c
commit
36383991d6
@ -14,7 +14,7 @@ def max_sequence_1(z: MemoryArray):
|
||||
for i in mrange(n):
|
||||
for j in mrange(i, n):
|
||||
s.set(0)
|
||||
for k in mrange(i, j):
|
||||
for k in mrange(i, j.succ()):
|
||||
s += z[k]
|
||||
if s > m:
|
||||
m.set(s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user