码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
【leetcode】Swap Nodes in Pairs
题目: 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 algorithm should use only cons...
分类:其他好文   时间:2014-08-29 13:13:37    阅读次数:169
LeetCode Linked List Cycle II 超时问题
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?题目意...
分类:其他好文   时间:2014-08-29 12:44:37    阅读次数:256
LeetCode Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?/** * Definition for singly-linked list. *...
分类:其他好文   时间:2014-08-28 19:41:25    阅读次数:224
【leetcode】Remove Nth Node From End of List
题目: 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 node fr...
分类:其他好文   时间:2014-08-28 18:12:35    阅读次数:289
31. Flatten Binary Tree to Linked List
思想: 如 Hints.
分类:其他好文   时间:2014-08-27 17:53:08    阅读次数:152
[LeetCode] Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then le...
分类:其他好文   时间:2014-08-27 00:20:16    阅读次数:232
LeetCode: Flatten Binary Tree to Linked List
LeetCode: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ...
分类:其他好文   时间:2014-08-26 22:57:46    阅读次数:220
Flatten Binary Tree to Linked List
Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ...
分类:其他好文   时间:2014-08-26 17:17:06    阅读次数:133
leetcode - Reverse Linked List II
题目:Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,ret...
分类:其他好文   时间:2014-08-26 13:35:46    阅读次数:223
leetcode - Partition List
题目:Partition ListGiven a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should p...
分类:其他好文   时间:2014-08-26 13:08:16    阅读次数:401
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!