C# two pointers, beats 100%
\npublic class Solution {\n    public int MaxSum(int[] nums1, int[] nums2) {\n        int i=0;\n        int j=0;\n        long a = 0;\n        long b = 0;\n    
```\npublic class Solution {\n    public int MaxSum(int[] nums1, int[] nums2) {\n        int i=0;\n        int j=0;\n        long a = 0;\n        long b = 0;\n        long mod = (long)1e9+7;\n        while(i<nums1.Length || j<nums2.Length){\n            if(i<nums1.Length && (j == nums2.Length || nums1[i]<nums2[j])){\n                a+=(nums1[i++]);\n            }\n            else if(j<nums2.Length &&( i == nums1.Length || nums2[j]<nums1[i])){\n                b+=(nums2[j++]);\n            }\n            else{\n                a = b = (Math.Max(a,b) + nums1[i]);\n                i++;\n                j++;\n            }\n        }\n        return (int) (Math.Max(a,b)%mod);\n    }\n}\n```
[]