3 ms·
Very cool. The problem reminds me of Kadanes algorithm, a dynamic programming approach to solve the maximum sum subset problem in linear time.
by grej 7y ago
Very cool. The problem reminds me of Kadanes algorithm, a dynamic programming approach to solve the maximum sum subset problem in linear time.