Pergunta de entrevista da empresa Adobe

Swap the doubly linked elemnts every element s after k elemnts