Search
⌘K

Leetcode 923. 3Sum With Multiplicity

Count the number of index triplets i<j<k with arr[i]+arr[j]+arr[k]==target (answer mod 1e9+7). The challenge is to handle multiplicity efficiently by using value frequencies (arr values 0..100) and combinatorial cases for equal/unequal values instead of brute-force O(n^3).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.