https://medium.com/software-development-and-architecture/solving-the-balanced-subarray-sums-problem-in-c-d94c175d0692