Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2014-10-22 14:32:39
阅读次数:
131
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2014-10-22 14:19:54
阅读次数:
123
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2014-10-22 14:10:45
阅读次数:
154
[leetcode]Given a linked list, reverse the nodes of a linked list k at a time and return its modified list....
分类:
其他好文 时间:
2014-10-22 11:04:19
阅读次数:
202
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 lea...
分类:
其他好文 时间:
2014-10-21 22:58:39
阅读次数:
235
给定一个二叉树,以集合方式返回其中序/先序方式遍历的所有元素。有两种方法,一种是经典的中序/先序方式的经典递归方式,另一种可以结合栈来实现非递归Given a binary tree, return theinordertraversal of its nodes' values.For examp...
分类:
其他好文 时间:
2014-10-21 22:49:08
阅读次数:
269
首先启动安装系统(我是采用vmware虚拟机)
1.设置键盘的布局
#loadkeys "us" #设置为美国的键盘布局,一般可以默认即可2.建立硬盘的分区
我采用的是fdisk对磁盘进行分区,主要的分区只有三个,/,/boot,SWAP分区,只是SWAP分区和其他的两个有所不同,是要按下t修改其格式为SWAP格式。
Fdisk 用法
以 root 身份启动 fdisk...
分类:
系统相关 时间:
2014-10-21 21:37:17
阅读次数:
297
什么是迭代器?别傻了,我最讨厌的就是名词解释了,反正就是用来遍历集合的一种方式。
比如,我们最常用的pairs,如下代码:...
分类:
其他好文 时间:
2014-10-21 21:33:13
阅读次数:
198
分区类型 分区的实际大小 解析 SWAP分区 2G (内存为1G,一般为内存的2倍) / 1G-2G (最少要150–250MB) /boot 32M-100M ...
分类:
Web程序 时间:
2014-10-21 21:18:02
阅读次数:
251
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2014-10-21 21:02:56
阅读次数:
259