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) { ...

Markdown supported · ⌘↵ to post
No responses yet.