One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #include<cmath> | |
| #include<iostream> | |
| #include<climits> | |
| using namespace std; | |
| int Maximum_Sum_Subarray(int arr[],int n) //Overall Time Complexity O(n) | |
| { | |
| int ans = A[0],sum = 0; | |
| for(int i = 1;i < n; ++i) //Check if all are negative | |
| ans = max(ans,arr[i]); |