Same trick as 3Sum, nested one level deeper: fix i, fix j,
then converge left / right on what's left. Every fixed
pointer gets its own duplicate guard — four in total.
Execution
idle
Press Run to begin.
0 / 0
Speed
Java · running line
fixed ifixed jleftrightquad founddup skip
O(n³) time · O(1) extra (excluding output) · same recipe generalizes to any k — see the kSum visualizer.