Adobe Interview Question

Swap the doubly linked elemnts every element s after k elemnts