Given a list $\text{A}$ of $\text{N}$ elements and a number $\text{K}$, your task is to output the $\text{N – K + 1}$ values listing the minimum among $\text{A} [i]\cdots \text{A}[i+\text{K}-1]$ for every $1\leq i\leq \text{N – K + 1}$.
Provide an algorithm for this task, that runs in time atmost $\mathcal{O}(\text{N} \log \text{K}).$