Coding Challenge · ADVANCED
A circuit board has n energy cells arranged in a line, each with a positive or negative energy value. Due to design constraints, you must select exactly k non-overlapping segments (contiguous subarrays) such that the sum of the energies in each segment is strictly positive. Your objective is to maximize the total energ…