you give array length n number k Lets pick k nonoverlapping nonempty subarray initial array let si sum ith subarray order leave right Compute maximum value follow expression s1s2s2s3sk1skHere subarray contiguous array