this is my code
Max sub array it failed to pass any test case
declare a new array for each test case
int main() {
int t;
int N;
cin>>t;
for(int i=0; i<t; i++){
cin>> N;
int a[N];
after doing that also it will not passing any test case
Now it will work
Thanks
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.