Maximum Sum Contiguous Subarray - LeetCode
The problem is taken from 53. Maximum Subarray.
Brute force approach
For each element in the array we need to find all possible contiguous subarray to the right of it.
Code -
class Solution {
public:
int maxSubArray(vector<int>& nums) {
...
suraj26.hashnode.dev3 min read