Explain how you would implement a sliding window algorithm to find the maximum sum of a contiguous subarray of size k.