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
inversion pairs by merge sort
分类:
其他好文 时间:
2014-06-26 23:34:49
阅读次数:
294
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
题目: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
题目: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
题目: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
【题目】
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
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
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