Problem 1171 · Medium

Remove Zero Sum Consecutive Nodes from Linked List

Use running sums: two nodes with the same prefix sum bound a zero-sum run that can be cut out.

Open the interactive visualisation