0923. 3Sum With Multiplicity
https://leetcode.com/problems/3sum-with-multiplicity
Description
Given an integer array arr
, and an integer target
, return the number of tuples i, j, k
such that i < j < k
and arr[i] + arr[j] + arr[k] == target
.
As the answer can be very large, return it modulo 109 + 7
.
Example 1:
Example 2:
Constraints:
3 <= arr.length <= 3000
0 <= arr[i] <= 100
0 <= target <= 300
ac
Last updated