OpenText interview question

Question related to sliding window and subarray sum