PocketPills interview question

coding question on subarray sum