Problems > Three That Sum to T > Editorial

Three That Sum to T — Solution & Editorial

Back to the Problem

Sort; fix the smallest element and close the remaining pair with two pointers — O(N²) total, comfortably inside the limits.

Complexity: O(N2)