Zalando interview question

Online coding test, Q2 - Maximum sum sub sequence/dynamic programming