Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recursive soluti...
分类:
其他好文 时间:
2014-12-19 12:14:35
阅读次数:
118
Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ ...
分类:
其他好文 时间:
2014-12-18 23:31:30
阅读次数:
236
上一篇HTTPclient模拟登陆交大图书馆
解决了登陆,登陆之后便可以查看个人信息。个人信息条目较少,如图:
主要就是:姓名、电话、目前借书、积欠金额。
查看其html代码:
下面开始进行解析:
代码
package com.ali.login.spider;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Do...
分类:
Web程序 时间:
2014-12-18 22:24:38
阅读次数:
297
题目Maximum Depth of Binary Tree通过率44.2%难度EasyGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest pat...
分类:
其他好文 时间:
2014-12-18 20:28:05
阅读次数:
214
标题:Maximum Depth of Binary Tree通过率:44.2%难度:简单Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest pa...
分类:
其他好文 时间:
2014-12-18 15:05:18
阅读次数:
153
1.基本理论/dev/shm这个文件是寄生虫,寄存在内存中swap是暂时在硬盘中划分一个区域,把它作为内存使用2.怎样查看使用df -lh能够查看/dev/shm使用free -m能够查看swap文件3.联系:/dev/shm都是暂时性文件4.何时使用/dev/shm文件的优越性一下被oracle发...
分类:
其他好文 时间:
2014-12-18 10:17:45
阅读次数:
157
Given a singly linked list L: 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 example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-12-17 22:41:01
阅读次数:
243
package com.zl.generic;/** * 交换“任意”数组 中两个元素 */public class GenericSwapArray { public static void main(String[] args) { swap(new String[]{"1","2","3"}....
分类:
编程语言 时间:
2014-12-17 20:24:58
阅读次数:
190
【题目】
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remai...
分类:
其他好文 时间:
2014-12-17 18:37:28
阅读次数:
188
故障简单描述一下:LINUX系统未开启HugePages,主机内存将近300G,SWAP是32G。ORACLE 的 SGA_MAX_SIZE设置是主机内存的将近80%,SGA_TARGET设置是主机内在的将近60%,正常情况下数据库session大约在将近500。故障当天业务有变化,session数增加了一倍,达到上1000个,内存紧张,用到了SWAP空间。
解决:找时间关数据库,重新配置Hug...
分类:
数据库 时间:
2014-12-17 18:29:17
阅读次数:
242