Learn when to apply sliding window versus two pointers versus binary search on arrays.
You must find the length of the longest contiguous subarray whose sum is at most K, given an array of positive integers. Which technique gives an optimal O(n) solution?