Which of the following is the time complexity of using the sliding window technique to find the maximum sum of any subarray of size k
in an array of size n
?
O(n^2)
O(n)
O(k * n)
O(k)
This question is part of this quiz :
Quiz on Sliding window Technique for DSA