What is the problem in this

problem is coming with the test case but other cases are giving correct answers.

hey @deepak_g22, there is no need to check these condition for t and n, Just make sure that your dataype is large enough to satisfy these constraint. As the constraints are high in this question, change datatype from int to long long.

Kadanes function is also not correct. You can take idea from this code https://ide.codingblocks.com/s/93277

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.