1885. Count Pairs in Two Arrays
https://leetcode.com/problems/count-pairs-in-two-arrays
Description
Given two integer arrays nums1
and nums2
of length n
, count the pairs of indices (i, j)
such that i < j
and nums1[i] + nums1[j] > nums2[i] + nums2[j]
.
Return the number of pairs satisfying the condition.
Example 1:
Example 2:
Constraints:
n == nums1.length == nums2.length
1 <= n <= 105
1 <= nums1[i], nums2[i] <= 105
ac
Previous1884. Egg Drop With 2 Eggs and N FloorsNext1886. Determine Whether Matrix Can Be Obtained By Rotation
Last updated