码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
Reverse Nodes in k-Group
Link:http://oj.leetcode.com/problems/reverse-nodes-in-k-group/Given a linked list, reverse the nodes of a linked listkat a time and return its modifie...
分类:其他好文   时间:2014-05-05 22:46:42    阅读次数:456
Reverse Linked List II
Link:http://oj.leetcode.com/problems/reverse-linked-list-ii/Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1...
分类:其他好文   时间:2014-05-05 22:46:11    阅读次数:411
Swap Nodes in Pairs
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:其他好文   时间:2014-05-05 22:45:37    阅读次数:331
Reverse Linked List II
Reverse 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,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2014-05-02 09:10:46    阅读次数:252
[leetcode]Linked List Cycle @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle/题意:判断链表中是否存在环路。解题思路:快慢指针技巧,slow指针和fast指针开始同时指向头结点head,fast每次走两步,slow每次走一步。如果链表不存在环,那么fast或者fast...
分类:编程语言   时间:2014-05-01 10:33:38    阅读次数:426
[leetcode]Linked List Cycle II @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle-ii/题意:如果链表中存在环路,找到环路的起点节点。解题思路:这道题有点意思。首先使用快慢指针技巧,如果fast指针和slow指针相遇,则说明链表存在环路。具体技巧参见上一篇http://w...
分类:编程语言   时间:2014-05-01 08:19:31    阅读次数:340
[leetcode]Remove Nth Node From End of List @ Python
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given a linked list, remove thenthnode from the end of list and return its he...
分类:编程语言   时间:2014-05-01 06:42:15    阅读次数:332
Reverse Linked List II
链表反转的简单变形。
分类:其他好文   时间:2014-05-01 03:46:43    阅读次数:248
Leetcode:Reorder List 单链表重排序
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it to ...
分类:其他好文   时间:2014-04-29 13:42:21    阅读次数:427
leetcode day5 -- Reorder List && Linked List Cycle II
1、 ?? Reorder List  Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2...
分类:其他好文   时间:2014-04-29 13:16:21    阅读次数:250
3784条   上一页 1 ... 376 377 378 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!