You are given two integer arrays nums1 and nums2, each of length n.
You may choose two indices left and right such that left right n, and swap the elements between nums1 and nums2 from index left to index right inclusive. You can perform this operation at most once, or choose not to perform any swap.
The score is defined as the maximum of the sum of elements in nums1 and the sum of elements in nums2.
Return the maximum possible score you can achieve.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[i]
You are given two integer arrays nums1 and nums2, each of length n.
You may choose two indices left and right such that left right n, and swap the elements between nums1 and nums2 from index left to index right inclusive. You can perform this operation at most once, or choose not to perform any swap.
The score is defined as the maximum of the sum of elements in nums1 and the sum of elements in nums2.
Return the maximum possible score you can achieve.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[i]