[LeetCode] Count the Number of Fair Pairs

1 · · Feb. 12, 2023, 3:11 a.m.
2563. Count the Number of Fair Pairs Given a 0-indexed integer array nums of size n and two integers lower and upper, return the number of fair pairs. A pair (i, j) is fair if: 0 <= i < j < n, and lower <= nums[i] + nums[j] <= upper ...