链表操作
nameix
这个作者很懒,什么都没留下…
展开
-
删除链表中倒数K元素
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ public class Solution { public ListNode remo原创 2016-09-19 21:16:11 · 308 阅读 · 0 评论 -
LeetCode-----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. Subscribe to see which compan原创 2016-11-14 11:30:39 · 248 阅读 · 0 评论