第16题 reverse every K elements of a linked list

Write a program to reverse every K elements of a linked list.

Example: K = 3


1->2->3->4->5->6->NULL


output: 3->2->1->6->5->4-NULL




你可能感兴趣的:(element)