Here is the code
My all the test cases are fialing why
hey @pyash there were couple of mistakes in your code
- since you are replacing each number with negative of itself, you need to store kadane(a[], m) before doing that
- you need print answer for each test case in new line
here is your code after rectifications
https://ide.codingblocks.com/s/194049
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.