My soln for this CodeChef: Practical coding for everyone
Problem Link - CodeChef: Practical coding for everyone
I cant find any other test case in which my code fails.
Can any1 give other test case?
Logic - Just merge all the adjacent positive numbers in the array. From this array, take the negative element one by one and try to check in left and right upto k negative numbers, if present, on both sides and calculate the sum using prefix sums.