Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-06-18 12:51:52
阅读次数:
205
find命令是个用于搜索文件的命令,他的语法格式:find [path] [options] [tests] [actions]1、path部分是你指定的路径,可以是绝对路径,如/usr/bin,也可以是相对路径,如 . 。如果需要,也可以指定多个路径,如 find /var /home2、opti...
分类:
系统相关 时间:
2014-06-17 21:00:09
阅读次数:
402
最近开始学习CMake,因为项目需求需要用到Qt,自带的qmake会出现许多问题(比如文件修改之后有时候qmake不会侦测到不会重新编译,需要手动去编译等),于是开始尝试使用CMake来编写Qt程序,顺便学习一下怎么用CMake来使用find_package,也算给自己一次学习的机会。 切入正题,....
分类:
其他好文 时间:
2014-06-17 20:45:35
阅读次数:
118
上网查了资料,看了其他人写的代码,学到了一下一些:c++头文件:algorithm.h这个头文件可以对范围内的数据做任何处理#include里面包含的函数有: 非修改性序列操作(12个)循环对序列中的每个元素执行某操作for_each()查找在序列中找出某个值的第一次出现的位置find()在序列中找...
分类:
其他好文 时间:
2014-06-17 15:30:42
阅读次数:
204
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet...
分类:
其他好文 时间:
2014-06-17 14:57:30
阅读次数:
269
十六. 文件查找命令find: 下面给出find命令的主要应用示例: /> ls -l #列出当前目录下所包含的测试文件 -rw-r--r--. 1 root root 48217 Nov 12 00:57 install.log -rw-r--r--. 1 root root 37 Nov 12 ...
分类:
系统相关 时间:
2014-06-17 14:45:55
阅读次数:
284
1. find find pathname -options [-print -exec -ok] 让我们来看看该命令的参数: pathname find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。 -print find命令将匹配的文件输出到标准输出。 -exec ...
分类:
系统相关 时间:
2014-06-17 14:38:57
阅读次数:
383
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-06-17 14:35:50
阅读次数:
297
HDU 2095 find your present (2)题目描述:Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your spe...
分类:
其他好文 时间:
2014-06-17 14:12:54
阅读次数:
217
当前系统的postfix的版本为 postfix-2.6.6-2.2.el6_1.x86_64获取新的postfix的包 postfix-2.11.0.tar.gz解压 cd postfix-2.11.0要是有.spec的文件可以打包成包,就很方便了 find -name '*.spec'vim I...
分类:
数据库 时间:
2014-06-17 13:57:51
阅读次数:
288