For given sequence of numbers $a_1, a_2, \ldots, a_n$ we say that $a_i$ is $k$-local maximum, if $i > k$ and $a_i$ is largest of numbers $a_{i - k}, a_{i-k+1}, \ldots, a_i$.
How can we find all $k$-local maximums in running time $\mathcal{O}(n \log k)$? Algorithm takes integer $k$ and sequence $a_1, a_2, \ldots, a_n$.
Insert $a_1,a_2,\ldots a_k$ into a skip-list $L$.
Create a $k$-sized array (called, say, $A$) with pointers to the nodes $a_1,a_2,\ldots a_k$ are stored in inside the skip list.
Next, for $i\in \{k+1,k+2,\ldots n\}$:
Overall runtime is $O(n\log k)$, as every iteration takes $O(\log k)$ time.