C++ easy two pointer solution faster than 100% 36ms
C++ Easy two pointer solution \n\n\nint maxSum(vector<int>& a, vector<int>& b) {\n        ios_base::sync_with_stdio(false);\n        cin.tie(NULL);\n        lon
C++ Easy two pointer solution \n\n```\nint maxSum(vector<int>& a, vector<int>& b) {\n        ios_base::sync_with_stdio(false);\n        cin.tie(NULL);\n        long i=0, j=0, n=a.size(), m=b.size(), as = 0, bs = 0;\n        while( i < n && j < m){\n            if(a[i] < b[j])as += a[i++];\n            else if(b[j] < a[i]) bs += b[j++];\n            else as = bs = max(as, bs) + a[i++], j++;\n        }\n        while(i < n) as += a[i++];\n        while(j < m) bs += b[j++];\n        return max(as, bs) % 1000000007;\n    }\n```
['Two Pointers', 'C++']