Max_sum_k_parition , Getting wrong answer on one test case , may i know where i am going wrong

This is the code , so why it is failing 1 test case