码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
[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.
分类:其他好文   时间:2014-06-27 12:48:46    阅读次数:259
1.7 逆序数与归并排序[inversion pairs by merge sort]
inversion pairs by merge sort
分类:其他好文   时间:2014-06-26 23:34:49    阅读次数:294
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-06-26 23:04:14    阅读次数:221
提取新闻下一页
package com.unbank.robotspider.util;import java.util.HashMap;import java.util.Map;import org.jsoup.nodes.Document;import org.jsoup.nodes.Element;impor...
分类:其他好文   时间:2014-06-26 19:07:20    阅读次数:204
leetcode 题解: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-06-26 16:03:52    阅读次数:296
leetcode 题解:Binary Tree Inorder Traversal (二叉树的中序遍历)
题目:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].N...
分类:其他好文   时间:2014-06-26 16:02:42    阅读次数:172
leetcode题解:Binary Tree Postorder Traversal (二叉树的后序遍历)
题目:Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]...
分类:其他好文   时间:2014-06-26 15:59:16    阅读次数:207
LeetCode: Clone Graph [133]
【题目】 Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separator for each node, and , as a separator for node label and each ne...
分类:其他好文   时间:2014-06-26 06:48:16    阅读次数:285
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-06-25 12:14:23    阅读次数:159
leetcode--Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2014-06-25 11:10:16    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!