Recursion

  • take at most k nodes from the linked list into temp
  • reverse the temp if its length is k
  • join the reversed linked list and reverseKGroup(k + 1 node)