Count Fair Pairs
Given a 0-indexed integer array nums and two integers lower and upper, count the number of pairs (i, j) with i < j such that lower <= nums[i] + nums[j] <= upper.
Given a 0-indexed integer array nums and two integers lower and upper, count the number of pairs (i, j) with i < j such that lower <= nums[i] + nums[j] <= upper.