码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
circular linked list&CLL(循环链表)
循环链表,和苯一样,一条蛇咬住了自己的尾巴。在 操作系统 给 进程 分配运行 资源 时,有体现。 受益颇多 ...
分类:其他好文   时间:2018-07-21 18:52:50    阅读次数:141
leetcode 142. Linked List Cycle II
题目要求不修改链表结构,同时不用额外的内存,去找到链表中环的起点。 我们可以通过快慢指针很容易判断有没有环,接下来,再把快指针的步伐也变为1并从head开始走,那么快慢指针再次相遇对应的指针就是环的起点。 解释:可以把问题抽象成一个直线和圈的结构, 粉色点表示相遇点,那么快指针走过a+b+c+b,慢 ...
分类:其他好文   时间:2018-07-16 20:01:42    阅读次数:134
Linked list
单恋表(^_^) 数组是由一系列相同数据类型,而且占用了连续的存储空间。 优点 缺点 单链表是线性数据结构,存储时不必连续的存储在一起,彼此通过pointers相互连接。 优点 缺点 先上C代码 Java代码 ...
分类:其他好文   时间:2018-07-14 16:47:10    阅读次数:206
Leetcode 23. Merge k Sorted Lists
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ 用排序的方法来解决问... ...
分类:其他好文   时间:2018-07-14 14:44:08    阅读次数:169
372. Delete Node in a Linked List【LintCode java】
Description Implement an algorithm to delete a node in the middle of a singly linked list, given only access to that node. Description Description Imp ...
分类:编程语言   时间:2018-07-14 13:11:45    阅读次数:133
Leetcode 21. Merge Two Sorted Lists
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu... ...
分类:其他好文   时间:2018-07-14 13:02:33    阅读次数:127
Leetcode 86. Partition List
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu... ...
分类:其他好文   时间:2018-07-14 11:55:16    阅读次数:135
LeetCode 160. Intersection of Two Linked Lists
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu... ...
分类:其他好文   时间:2018-07-14 10:20:12    阅读次数:195
Reverse Linked List II
描述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->nullptr, m = 2 and n = 4,return 1->4->3 ...
分类:其他好文   时间:2018-07-13 19:10:10    阅读次数:165
【LeetCode】83.删除排序链表中的重复元素
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu... ...
分类:编程语言   时间:2018-07-12 23:54:47    阅读次数:232
3784条   上一页 1 ... 64 65 66 67 68 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!