sign up google developer console, create project, generate API keyhttp://stackoverflow.com/questions/4082966/google-web-search-api-deprecated-what-now...
写程序在一棵二叉树中找到两个结点的最近共同祖先。
分两种情况来讨论这个题:
第一种情况结点中没有指向父结点的指针
第二种情况接种有指向父节点的指针
我们先看第一种情况,结点中没有指向父结点的指针。
我们可以采用暴力搜索每一个结点,如果这个结点的子树中
有已知的两个结点,那我们就继续沿着左右子树找,如果左子树
能找到,我们就继续沿着左子树找,如果有子树能找到,我们就
沿着右子...
分类:
其他好文 时间:
2014-09-07 02:13:34
阅读次数:
165
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-09-06 05:27:32
阅读次数:
203
Binary Tree Level Order Traversal II
Total Accepted: 16983 Total
Submissions: 54229My Submissions
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie...
分类:
其他好文 时间:
2014-09-05 18:22:41
阅读次数:
212
The method showDialog(int) from the type Activity is deprecated in android?up vote6down votefavoriteThe methodshowDialog(int)from the typeActivityisde...
分类:
其他好文 时间:
2014-09-05 14:12:51
阅读次数:
365
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1258
Sum It Up
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4012 Accepted Submission(...
分类:
其他好文 时间:
2014-09-05 11:25:41
阅读次数:
185
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:
其他好文 时间:
2014-09-05 07:39:10
阅读次数:
261
POI操作Excel中,导出的数据不是很大时,则不会有问题,而数据很多或者比较多时,就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面报错如下:Caused by: java.lang.IllegalStateException: Th...
分类:
其他好文 时间:
2014-09-04 23:29:21
阅读次数:
408
*manpages*File: *manpages*, Node: crontab, Up: (dir)CRONTAB(1) General Commands Manual CRONTAB(1)NAME crontab - maintain crontab files for individual ...
分类:
系统相关 时间:
2014-09-04 22:10:50
阅读次数:
488
eth0,eth1,eth2……代表网卡一,网卡二,网卡三……lo代表127.0.0.1,即localhost参考:Linux命令:ifconfig功能说明:显示或设置网络设备 语 法:ifconfig [网络设备][down up -allmulti -arp -promisc][add][de....
分类:
其他好文 时间:
2014-09-04 18:56:09
阅读次数:
190