Leetcode 259. 3Sum Smaller
Count the number of index triplets (i<j<k) in an integer array whose sum is strictly less than a given target. The challenge is to do better than O(n^3) brute force—typically by sorting and using a two-pointer scan to count qualifying pairs for each fixed first element.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.