en
Feedback
Songs - Ed Sheeren - Taylor Swift - Justin Bieber - Sabrina Carpenter - The Weeknd - Billie Eilish - Eminem - BTS - Music

Songs - Ed Sheeren - Taylor Swift - Justin Bieber - Sabrina Carpenter - The Weeknd - Billie Eilish - Eminem - BTS - Music

Open in Telegram

🚩 Channel was restricted by Telegram

Show more
The country is not specifiedMusic45 197
782
Subscribers
No data24 hours
-127 days
-3030 days
Posts Archive
This message couldn't be displayed on your device due to copyright infringement.

#include <iostream> using namespace std; int subsum(int arr[], int n) { int res = arr[0]; int maxending = arr[0]; for (int i = 1, i < n, i++) { maxending = max(maxending + arr[i],arr[i]; res = max(res,maxending); } return res; } int main() { int n; int arr[]; cout << "Enter Your Array" << endl; for(int i = 0, i < n, i++) { cin >> arr[i]; } n = sizeof(arr)/sizeof(int); int res = subsum(arr[n] ,n); cout << res << endl; return 0; }