Three That Sum to T — Solution & Editorial
Sort; fix the smallest element and close the remaining pair with two pointers — O(N²) total, comfortably inside the limits.
Complexity: O(N2)
Sort; fix the smallest element and close the remaining pair with two pointers — O(N²) total, comfortably inside the limits.
Complexity: O(N2)