k-window n-array problem