摘要:
看剑指offer 阅读全文
posted @ 2019-04-09 16:29
MarkLeeBYR
阅读(80)
评论(0)
推荐(0)
摘要:
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? public class Solution { public boolean h 阅读全文
posted @ 2019-04-09 16:28
MarkLeeBYR
阅读(89)
评论(0)
推荐(0)
摘要:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. public c 阅读全文
posted @ 2019-04-09 16:27
MarkLeeBYR
阅读(179)
评论(0)
推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文
posted @ 2019-04-09 16:27
MarkLeeBYR
阅读(102)
评论(0)
推荐(0)
摘要:
* Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } 阅读全文
posted @ 2019-04-09 16:23
MarkLeeBYR
阅读(110)
评论(0)
推荐(0)
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2019-04-09 16:22
MarkLeeBYR
阅读(82)
评论(0)
推荐(0)
摘要:
Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this in on 阅读全文
posted @ 2019-04-09 16:22
MarkLeeBYR
阅读(98)
评论(0)
推荐(0)
摘要:
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2019-04-09 16:21
MarkLeeBYR
阅读(86)
评论(0)
推荐(0)
摘要:
Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2- 阅读全文
posted @ 2019-04-09 16:20
MarkLeeBYR
阅读(71)
评论(0)
推荐(0)
摘要:
Given a list, rotate the list to the right by k places, where k is non-negative. Example: class Solution { public ListNode rotateRight(ListNode head, 阅读全文
posted @ 2019-04-09 16:20
MarkLeeBYR
阅读(131)
评论(0)
推荐(0)