Thanksgiving Sale: Use Coupon Code THANKS25 to Get Extra 25% Off.
nums3 plus the diff and an offset to handle negative values.nums1 and nums2 into nums3 by subtracting corresponding elements.nums3 from left to right.nums3[j], query the BIT for the sum of counts of elements less than or equal to nums3[j] + diff.nums3[j].