1983. Widest Pair of Indices With Equal Range Sum
Description
**Input:** nums1 = [1,1,0,1], nums2 = [0,1,1,0]
**Output:** 3
**Explanation:**
If i = 1 and j = 3:
nums1[1] + nums1[2] + nums1[3] = 1 + 0 + 1 = 2.
nums2[1] + nums2[2] + nums2[3] = 1 + 1 + 0 = 2.
The distance between i and j is j - i + 1 = 3 - 1 + 1 = 3.**Input:** nums1 = [0,1], nums2 = [1,1]
**Output:** 1
**Explanation:**
If i = 1 and j = 1:
nums1[1] = 1.
nums2[1] = 1.
The distance between i and j is j - i + 1 = 1 - 1 + 1 = 1.ac
Previous1982. Find Array Given Subset SumsNext1984. Minimum Difference Between Highest and Lowest of K Scores
Last updated