首页 热点专区 小学知识 中学知识 出国留学 考研考公
您的当前位置:首页正文

61. 旋转链表 Rotate List

来源:要发发知识网

Given a list, rotate the list to the right by k places, where k is non-negative.

For example:

Given 1->2->3->4->5->NULL and k = 2,

return 4->5->1->2->3->NULL.

代码:

参考代码

解题思路:组成环形链表,然后找到头结点。

显示全文