Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 175 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 175 Bytes

Idea

The tricky part is to detect this transition function:

dp[i] = max(dp[i-1] + current, current)

then we just return the maximum of this dp array.