Maximum sub array sum code


my answer is coming 0. what am i doing wrong in this code

hey @chahatkumar, in Line no. 21, you are re declaring sum1, make it sum1=sum1+a[i]; instead of int sum1=sum1+a[i];

1 Like

okay thanks :slight_smile:

hey @chahatkumar , if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved

1 Like