Problem 15 · Medium

3Sum

Find every triple of values that sums to zero by fixing one value and sweeping two pointers across the sorted rest. The visual shows the pointers closing in and the matching triples collected.

Open the interactive visualisation