Problem 2270 · Medium

Number of Ways to Split Array

Track a running prefix sum and compare it with the remaining suffix, which is the total minus the prefix.

Open the interactive visualisation