Optimize containsTwoContiguousSubArraysWithEqualSums() to efficiently
compute the 2 sums on each iteration