GlobalLogic interview question

Reverse a k - spaced linkedlist