这两道题用递归的解法都很简单,只是稍有不同。下面是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
https://code.google.com/a/eclipselabs.org/p/logviewer/Grep
Console
分类:
系统相关 时间:
2014-05-09 17:40:36
阅读次数:
347
在vim中提供2中方法来在其他文件或者文件夹中搜索字符串,第一种是vimgrep还有一种是grep。如果只是在当前打开的文件中查找字符串的,使用:?后面加上想要搜索的字符串就可以。这里要解决的是在别的文件中,也许这个文件还没有打开,或者需要在多个文件中操作,比如在当前文件夹下面所有.c的文件中查找,...
分类:
其他好文 时间:
2014-05-09 12:46:51
阅读次数:
370
http://acm.hdu.edu.cn/showproblem.php?pid=1598
1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6
const int inf=1<<30; 7...
分类:
其他好文 时间:
2014-05-05 10:53:38
阅读次数:
344
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3
#include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:
其他好文 时间:
2014-05-05 10:52:15
阅读次数:
315
本文记录Linux安装MySql过程。环境:OS:Centos 6.5 x64 & MySql
5.1 x641、系统检查检查是否已经安装MySql数据库。[root@master ~]# rpm -qa | grep
mysql如果有安装,先卸载已经安装的MySql数据库。[root@master...
分类:
数据库 时间:
2014-05-05 10:12:56
阅读次数:
502
常见错误列表一、编译arm环境的时候:./configure -prefix
$HOME/Qtenv/arm -embedded arm-nomake docs -nomake demo -nomake
examples1、configure完成之后,make出现问题:/usr/bin/ld: ca...
分类:
其他好文 时间:
2014-05-05 09:32:27
阅读次数:
1967
文件查找的需要:grep:(GLOBALResearch)根据模式(网)去搜索文本,而后将符合模式的文本行显示出来。【部分匹配,显示时显示一行】Pattern:模式。(文本字符以及正则表达式元字符组合而成的匹配条件)例子:grep‘root’/etc/passwdgrep所支持的选项:-i:忽略大小写--color..
分类:
系统相关 时间:
2014-05-04 17:26:50
阅读次数:
390