Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2014-10-19 01:21:45
阅读次数:
204
1、在进入while之前,保证x是非负的;2、符号还是专门用flag保存===================3、另一思路:将integer转换成string,然后首位swap,直至中间; 1 class Solution: 2 # @return an integer 3 def ...
分类:
编程语言 时间:
2014-10-18 23:41:02
阅读次数:
253
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-10-18 20:57:37
阅读次数:
229
相信下面這個C程序很多人都見過啦,當時自己看 美少女战士谭浩强 写的那本书上的解释,反正我当时是没看太懂具体是什么意思,谱架啊~~~
#include
void swap(int x, int y)
{
int temp = x;
x = y;
y = temp;
}
int main()
{
int n, m;
while(~scanf("%d %...
分类:
其他好文 时间:
2014-10-18 19:45:57
阅读次数:
167
1 Tmpfs是什么tmpfs是Linux/Unix系统上的一种基于内存的文件系统。tmpfs可以使用您的内存或swap分区来存储文件。由此可见,tmpfs主要存储 暂存的文件。优势 : 1、 动态文件系统的大小。2、tmpfs 的另一个主要的好处是它闪电般的速度。因为典型的tmpfs文件系统会完全...
分类:
系统相关 时间:
2014-10-18 18:16:30
阅读次数:
234
LCM Cardinality
Input: Standard Input
Output: Standard Output
Time Limit: 2 Seconds
A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible pairs. For ex...
分类:
其他好文 时间:
2014-10-17 15:37:49
阅读次数:
260
树的判定
时间限制:1000 ms | 内存限制:65535 KB
难度:4
描述
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edge...
分类:
其他好文 时间:
2014-10-17 09:23:24
阅读次数:
172
【题目】
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#...
分类:
其他好文 时间:
2014-10-16 18:00:42
阅读次数:
245
【题目】
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-10-16 17:12:42
阅读次数:
186
昨天去一客户那里安装11g数据库,把整个安装过程和遇到的一些问题做个记录,分享一下。由于该客户无法用自己的机器远程连接到服务器,也不允许通过U盘、移动硬盘等拷贝任何文件,因此一些记录内容无法做到很详尽,只能凭记忆大致写出。
主机:SUN Netra T4-1 M4000
CPU:8 core 2.85GHz
内存:32G
系统:Solaris 10...
分类:
其他好文 时间:
2014-10-16 15:10:52
阅读次数:
316