码迷,mamicode.com
首页 >  
搜索关键字:递归 return    ( 77935个结果
LeetCode OJ - Minimum && Maximum Depth of Binary Tree
这两道题用递归的解法都很简单,只是稍有不同。下面是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
LeetCode OJ - construct Binary Tree from Inorder and Postorder/Preorder Traversal
不断递归的实现!!!!下面是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
cout顺序,i++和++i
先看下以下代码#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
Reverse Nodes in k-Group
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
jQuery同时处理一个控件的click和dblclick事件
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
C# 访问一个页面,并根据该页面上的a标签递归访问每个页面
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
IOS 类别与扩展的区别 (category & extensions)
类别.h@interface NSString(XXXXXX)-(NSInteger)getLen;@end.m@implementation NSString(XXXXXX) -(NSInteger)getLen{ return 0;}@end//////////////////////////....
分类:移动开发   时间:2014-05-08 20:20:28    阅读次数:365
TortoiseSVN里checkout depth各选项的含义
代表四种检出深度: 1、Fully recursive——全递归:检出完整的目录树,包含所有的文件或子目录。2、Immediate children,including folders——直接子节点,包含文件夹:检出目录,包含其中的文件或子目录,但是不递归展开子目录。3、Only file chli...
分类:其他好文   时间:2014-05-08 20:08:29    阅读次数:290
hdu 1159
题意:求最长子序列#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
JQuery求和函数
function convert2Int(num) {num = parseInt(num); return isNaN(num) ? 0 : num; } $(function () { var rows = $("...
分类:Web程序   时间:2014-05-06 09:38:17    阅读次数:1838
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!