作者:Vamei 出处:http://www.cnblogs.com/vamei
欢迎转载,也请保留这段声明。谢谢!在编译一个大型项目的时候,往往有很多目标文件、库文件、头文件以及最终的可执行文件。不同的文件之间存在依赖关系(dependency)。比如当我们使用下面命令编译时:$gcc
-c -o...
分类:
其他好文 时间:
2014-05-27 01:29:33
阅读次数:
373
echo -e "#include \nint main()\n{\n printf(\"hello
world\\\n\");\n return 0;\n}" > h.c; gcc h.c; ./a.outh.c里的内容#include int
main(){ printf("h...
分类:
其他好文 时间:
2014-05-24 07:34:05
阅读次数:
213
svn版本管理工具(该笔记记录svn在WINDOWS 下使用)曾经流行的是cvs
已经被svn所替代,apache旗下子项目。官方网站http://subversion.apache.org/点击download page下载点击binary
packages点击下载自动下载安装svn安装后将svn...
分类:
其他好文 时间:
2014-05-24 00:26:13
阅读次数:
357
Linux环境下yum源安装GCC前提条件是有Linux环境的安装盘ISO文件在Linux系统中创建两个目录,一个是用来存放ISO文件,一个是用来挂载该ISO文件,如下:$mkdir
/root/iso;$mkdir /root/repo;把Linux安装文件ISO文件放置到iso目录下,然后用mo...
分类:
其他好文 时间:
2014-05-23 22:16:00
阅读次数:
314
题目:Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical...
分类:
其他好文 时间:
2014-05-23 12:40:21
阅读次数:
352
题目:Given a binary tree, determine if it is a valid
binary search tree (BST).Assume a BST is defined as follows:The left subtree of
a node contains onl...
分类:
其他好文 时间:
2014-05-23 12:20:50
阅读次数:
407
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-05-23 11:54:10
阅读次数:
317
题目:Two elements of a binary search tree (BST) are
swapped by mistake.Recover the tree without changing its structure.Note:A
solution using O(n) space ...
分类:
其他好文 时间:
2014-05-23 11:31:51
阅读次数:
299
戳我去解题Given an array where elements are sorted in
ascending order, convert it to a height balanced
BST.分析:因为BST中序序列是升序的,所以中序遍历序列最中间的元素一定是根节点,然后左右递归构建二叉...
分类:
其他好文 时间:
2014-05-20 11:38:16
阅读次数:
233
戳我去解题Given two binary strings, return their sum
(also a binary string).For example,a ="11"b
="1"Return"100".分析:高精度加法,只是将10进制的高精度加法 换成了 2进制的高精度加法首先将 两个...
分类:
其他好文 时间:
2014-05-20 11:21:52
阅读次数:
224