这两道题用递归的解法都很简单,只是稍有不同。下面是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
不断递归的实现!!!!下面是AC代码: 1 /** 2 * Given inorder and
postorder traversal of a tree, construct the binary tree. 3 * @param inorder 4 *
@param...
分类:
其他好文 时间:
2014-05-10 08:40:40
阅读次数:
297
先看下以下代码#includeusing namespace std;int x = 1;int
f1(){ x = 2; return x;}int f2(){ x = 3; return x;}int main(){ //Test1 cout
<< x << ...
分类:
其他好文 时间:
2014-05-10 01:07:57
阅读次数:
375
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-09 12:00:21
阅读次数:
309
1 jQuery.fn.single_double_click =
function(single_click_callback, double_click_callback, timeout) { 2 return
this.each(function(){ 3 var clicks...
分类:
数据库 时间:
2014-05-08 20:54:46
阅读次数:
373
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;using
System.Net;using ...
分类:
其他好文 时间:
2014-05-08 20:30:34
阅读次数:
389
类别.h@interface
NSString(XXXXXX)-(NSInteger)getLen;@end.m@implementation
NSString(XXXXXX) -(NSInteger)getLen{ return
0;}@end//////////////////////////....
分类:
移动开发 时间:
2014-05-08 20:20:28
阅读次数:
365
代表四种检出深度: 1、Fully
recursive——全递归:检出完整的目录树,包含所有的文件或子目录。2、Immediate children,including
folders——直接子节点,包含文件夹:检出目录,包含其中的文件或子目录,但是不递归展开子目录。3、Only file chli...
分类:
其他好文 时间:
2014-05-08 20:08:29
阅读次数:
290
题意:求最长子序列#include#includeusing namespace std;int
max(int x,int y){ if(x>y) return x; return y;}int map[1001][1001];char
s1[1001],s2[1001];int main(){ ...
分类:
其他好文 时间:
2014-05-07 20:07:29
阅读次数:
202
function convert2Int(num) {num = parseInt(num);
return isNaN(num) ? 0 : num; } $(function () { var rows = $("...
分类:
Web程序 时间:
2014-05-06 09:38:17
阅读次数:
1838