Log in
← All problems

Biggest sum of a stretch

hardProblem solving40 XP

Return the largest sum of a non-empty run of neighbouring numbers in nums. Can you do it in one pass (look up Kadane's algorithm)?

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 3 hidden tests.