My issue
how to solve the problem
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin<<t;
while(t--){
int max=INT_MIN;
int prefix=0;
for(i=0;i<A.size();i++){
prefix+=A[i];
maxi=max(maxi,prefix)
if(prefix<0)
prefix=0;
}
rerurn maxi;
}
}
Problem Link: Easy Subarray Sum Practice Coding Problem