码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
Cracking the Coding Interview Q2.1
Write code to remove duplicates from an unsorted linked list.
分类:其他好文   时间:2014-07-08 22:18:56    阅读次数:219
Cracking the Coding Interview Q2.3
Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.
分类:其他好文   时间:2014-07-08 22:03:31    阅读次数:195
Cracking the Coding Interview Q2.2
Implement an algorithm to find the kth to last element of a singly linked list.
分类:其他好文   时间:2014-07-08 22:01:38    阅读次数:209
CTCI 2.3
Implement an algorithm to delete a node in the middle of a singly linked list, given only access to that node.EXAMPLEInput: the node c from the linked...
分类:其他好文   时间:2014-07-08 21:58:08    阅读次数:273
【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? 解答 首先要注意空链表不成环;不能开额外的空间,即空间复杂度是o(1),可采用“快慢指针”查检查链表是否含有环,如果在快的指针能够追上慢的指针,则有环,否...
分类:其他好文   时间:2014-07-08 19:17:47    阅读次数:160
Cracking the Coding Interview Q2.6
Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linke...
分类:其他好文   时间:2014-07-08 17:29:35    阅读次数:200
【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 constant spac...
分类:其他好文   时间:2014-07-08 13:46:26    阅读次数:205
CTCI 2.1
Write code to remove duplicates from an unsorted linked list.FOLLOW UPHow would you solve this problem if a temporary buffer is not allowed?/* Use a H...
分类:其他好文   时间:2014-07-08 00:59:05    阅读次数:305
[leetcode] Insertion Sort List
Sort a linked list using insertion sort.
分类:其他好文   时间:2014-07-08 00:41:08    阅读次数:228
CTCI 2.2
Implement an algorithm to find the kth to last element of a singly linked list.Classical "Runner" Technique of linkedlist/*Use two pointers, forward o...
分类:其他好文   时间:2014-07-08 00:37:17    阅读次数:315
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!