Problem 2824 · Easy

Count Pairs Whose Sum is Less than Target

Sort the values, then move two pointers inward; when a pair is small enough, every index between them pairs with the left end.

Open the interactive visualisation