链表
文章平均质量分 77
iyangdi
这个作者很懒,什么都没留下…
展开
-
LeetCode:M-565. Array Nesting
LeetCode链接A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1].Sets S[K] for 0 S[K] = { A[K], A[A[K]], A[A[A[K]原创 2017-09-13 13:12:34 · 307 阅读 · 0 评论 -
LintCode:M-复制带随机指针的链表
LintCode:Link给出一个链表,每个节点包含一个额外增加的随机指针可以指向链表中的任何节点或空的节点。返回一个深拷贝的链表。 您在真实的面试中是否遇到过这个题? Yes样例挑战 可否使用O(1)的空间/** * Definition for singly-linked li原创 2017-08-28 12:19:49 · 255 阅读 · 0 评论 -
LeetCode:M-287. Find the Duplicate Number
LeetCode链接Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one原创 2017-09-25 17:12:56 · 316 阅读 · 0 评论 -
LeetCode:M-2. Add Two Numbers
LeetCode链接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 contain a single digit. Add the tw原创 2017-09-10 20:12:50 · 244 阅读 · 0 评论 -
LeetCode:M-19. Remove Nth Node From End of List
LeetCode链接Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second no原创 2017-09-10 21:05:47 · 225 阅读 · 0 评论 -
LeetCode:M-142. Linked List Cycle II
LeetCode链接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 you solve it without usin原创 2017-09-10 19:26:04 · 226 阅读 · 0 评论