Problem 1171 · Medium
Use running sums: two nodes with the same prefix sum bound a zero-sum run that can be cut out.
Open the interactive visualisation