码迷,mamicode.com
首页 >  
搜索关键字:nodes    ( 4030个结果
[Leetcode] Reorder List
Given a singly linked listL: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 exam...
分类:其他好文   时间:2014-11-16 18:33:18    阅读次数:200
Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-11-16 15:57:02    阅读次数:131
[Leetcode] Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-11-16 15:52:15    阅读次数:226
Reorder List
Given a singly linked listL: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 exam...
分类:其他好文   时间:2014-11-16 14:41:01    阅读次数:280
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-11-16 14:36:42    阅读次数:140
Binary Tree Preorder Traversal
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].二叉树...
分类:其他好文   时间:2014-11-16 13:23:07    阅读次数:138
[Leetcode] Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2014-11-16 09:24:55    阅读次数:216
Leetcode-Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o...
分类:其他好文   时间:2014-11-16 08:15:41    阅读次数:222
why is agreement hard in a distributed system?
same question as:why is PAXOS necessary?1, what if >1 nodes become leaders simultaneously?that's why we need phase#1 (prepare) to select a leader.2, w...
分类:其他好文   时间:2014-11-16 08:15:30    阅读次数:210
Leetcode-Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2...
分类:其他好文   时间:2014-11-16 08:14:02    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!