Given two integer arrays nums1 and nums2, return the maximum dot product between non empty subsequences of nums1 and nums2 of the same length.
Note:
A subsequence of an array is formed by deleting some or no elements without changing the relative order of the remaining elements.
The dot product of two arraysarr1andarr2of equal lengthis calculated as .
Constraints:
nums1.length, nums2.length
nums1[i], nums2[i]
Given two integer arrays nums1 and nums2, return the maximum dot product between non empty subsequences of nums1 and nums2 of the same length.
Note:
A subsequence of an array is formed by deleting some or no elements without changing the relative order of the remaining elements.
The dot product of two arraysarr1andarr2of equal lengthis calculated as .
Constraints:
nums1.length, nums2.length
nums1[i], nums2[i]