这两道题用递归的解法都很简单,只是稍有不同。下面是AC代码: 1 /** 2 * Given a 
binary tree, find its minimum depth. 3 * the minimum depth is the number of 
nodes along th...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 08:47:32   
                                阅读次数:
271
                             
                    
                        
                            
                            
                                Given two wordsword1andword2, find the minimum 
number of steps required to convertword1toword2. (each operation is counted as 1 
step.)You have the fol...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 01:09:28   
                                阅读次数:
325
                             
                    
                        
                            
                            
                                Given two words word1 and word2, find the 
minimum number of steps required to convert word1 to word2. (each operation is 
counted as 1 step.)You have t...
                            
                            
                                分类:
其他好文   时间:
2014-05-09 19:09:35   
                                阅读次数:
318
                             
                    
                        
                            
                            
                                select * from ( select row_number() over(order 
by BD008_001) as row ,* from ...
                            
                            
                                分类:
数据库   时间:
2014-05-09 16:56:57   
                                阅读次数:
328
                             
                    
                        
                            
                            
                                Oracle的数字类型主要有number,binary_float,binary_double三类,其他的像int,number(p,s)等等大多数都是由这些引申出来的。这部分的理解主要来自oracle11g编程艺术。 
其中提到的一个很有意思的东西就是number是软件模拟运算,而binary...
                            
                            
                                分类:
数据库   时间:
2014-05-09 16:32:13   
                                阅读次数:
350
                             
                    
                        
                            
                            
                                // test.cpp : Defines the entry point for the 
console application.//#include "stdafx.h"#include #include #include 
"winioctl.h"#define IOCTL_STORAGE_QU...
                            
                            
                                分类:
其他好文   时间:
2014-05-05 10:52:44   
                                阅读次数:
370
                             
                    
                        
                            
                            
                                linux系统下.vimrc文件(这个文件可以在家目录新建);这个文件记录着vim的配置信息;如:"显示行号set 
number"键映射map“如按F5,在word的前后加入{}map i{ea}
                            
                            
                                分类:
其他好文   时间:
2014-05-05 10:12:32   
                                阅读次数:
274
                             
                    
                        
                            
                            
                                typeof用以获取一个变量或者表达式的类型,typeof一般只能返回如下几个结果:number,boolean,string,function(函数),object(NULL,数组,对象),undefined。如:alert(typeof 
(123));//typeof(123)返回"number...
                            
                            
                                分类:
其他好文   时间:
2014-05-05 09:37:22   
                                阅读次数:
435
                             
                    
                        
                            
                            
                                Tomya is a girl. She loves Chef Ciel very much.
Tomya like a positive integer p, and now she wants to get a receipt of Ciel's restaurant whose total price is exactly p.
The current menus of Ciel's...
                            
                            
                                分类:
其他好文   时间:
2014-05-04 18:53:40   
                                阅读次数:
317
                             
                    
                        
                            
                            
                                We consider permutations of the numbers 1,..., N
for some N. By permutation we mean a rearrangment of the
number 1,...,N. For example
2  4  5  1  7  6  3  8
is a permutation of 1,2,...,8. Of cours...
                            
                            
                                分类:
其他好文   时间:
2014-05-04 18:38:14   
                                阅读次数:
341