Problem 923 · Medium

3Sum With Multiplicity

Sort, fix the first value, and use two pointers, counting runs of duplicates as combinations.

Open the interactive visualisation