阅读背景:

02-1 Reversing Linked List (PAT) - 链表问题

来源:互联网 

Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K = 4, you must output 4→3→2→1→5→6.Given a constant K and a singly linked list L,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: