Maximum in subarray

ques : https://hack.codingblocks.com/contests/c/452/504
please explain this ques, not able to understand

For each window of size k in an array that has indices ranges as
[0,k-1],[k,2k-1],…[n-k,n-1]
you need to find maximum array element that exists in between above indices range

1 Like

for k given number you have to find the greatest of first k elements in an array and same iterate on the full array if u still have some problem check this
https://ide.codingblocks.com/#/s/15894

1 Like