Strongest fighter intuition

how do i solve this problem in linear time?

you can solve it using the windowing technique(consider a window of size k at every point) and find max in each window