Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up: Can yo......

LeetCode上相关的题目(easy) 2, 21, 82, 83, 86, 141, 160, 203, 206, 234, 237 Medium题目 142 技巧 双指针，一个走两步，一个走一步，这样一个到了终点，另一个就到了中间了 双指针还能用于检测是否有cycle 切忌使用dummy创建新......

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 用两个指针，一快一慢，如果有cycle肯定会交汇 /** * Definiti......

Write a program to find the node at which the intersection of two singly linked lists begins.   For example, the following two linked lists: A: a......

Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 这道题目难在follow up上 /** * Definition......

Reverse a singly linked list. 这道题非常基础，需要熟练掌握 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode......

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......

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. /** * De......

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -&g......

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the ......

Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = ......

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1-&......

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-&......