Binary Tree Zigzag Level Order TraversalGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then...
分类:
其他好文 时间:
2014-11-30 18:29:54
阅读次数:
204
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...
分类:
其他好文 时间:
2014-11-29 21:37:39
阅读次数:
365
3、安装操作系统3.1在 VMware 控制台上,双击右面板上的 CD-ROM 设备,然后选择ISO 镜像,启动虚拟机;3.2中间大部分都默认即可,选择手动分区,先只分sda:文件系统类型:Swap 1500M挂载点:/文件系统类型:ext3 剩余空间3.3网络配置:选择并编辑 eth0 IP 地址...
分类:
数据库 时间:
2014-11-29 11:51:46
阅读次数:
345
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()...
分类:
编程语言 时间:
2014-11-29 10:32:48
阅读次数:
177
树的存储方式
//树的双亲表示
typedef struct{ //节点结构
ElemType data; //元素
int parent; //双亲位置
}PTNode;
typedef struct{ //树
PTNode nodes[Max];
int n; //树的节点个数
}PTree;
//孩子表示法
typedef struct{ //孩子结...
分类:
其他好文 时间:
2014-11-29 09:02:55
阅读次数:
199
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree {3...
分类:
其他好文 时间:
2014-11-29 07:06:01
阅读次数:
191
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Solution:...
分类:
其他好文 时间:
2014-11-29 07:03:53
阅读次数:
194
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-29 06:59:16
阅读次数:
153
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-11-29 06:50:19
阅读次数:
189
Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2]...
分类:
其他好文 时间:
2014-11-29 06:47:04
阅读次数:
137