来自专栏 · LeetCode刷题记录 1537. Get the Maximum Score 难度:h class Solution: def maxSum(self, nums1: List[int], nums2: List[int]) -> int: r1 = 0 r2 = 0 i, j = len(nums1)-1, len(nums2)-1 while i>=0 and j>=0: if nums1
If you are reading any value that is present innums1andnums2you are allowed to change your path to the other array. (Only one repeated value is considered in the valid path). Scoreis defined as the sum of uniques values in a valid path. Return the maximumscoreyou can obtain of all p...