Goldman Sachs interview question

Q: subarray sum problem