Max sum k partition problem

Still not able to understand.
please explain by taking another test case

6 5
5 4 3 2 1 -1

for this test case
asnwer is 5

another example;

1 2 5 2 3 4 5 1 2 0 1 5 9 2
k = 3

answer will be 27
please watch the hint video

u`ll understand better

@Anubhav44044 hey,You simply need to find a max from every k elements and add it to the sum. This can be accomplished using the following very simple code.Check this code:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.