Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric...
分类:
其他好文 时间:
2014-06-15 18:55:36
阅读次数:
188
这个题目给定一棵树,以及树的每个树枝的苹果数量,要求在保留K个树枝的情况下最多能保留多少个苹果一看就觉得是个树形DP,然后想出 dp[i][j]来表示第i个节点保留j个树枝的最大苹果数,但是在树形过程中,有点难表示转移后来看了下大神的做法才知道其实可以用背包来模拟 树枝的去留,其实真的是个背包诶,每...
分类:
移动开发 时间:
2014-06-15 07:48:55
阅读次数:
244
题目:Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ...
分类:
其他好文 时间:
2014-06-15 00:53:09
阅读次数:
314
Question:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, .....
分类:
其他好文 时间:
2014-06-14 20:59:07
阅读次数:
188
这里说的是编译安装,yum/apt-get 等安装方法比較简单,不阐述!1、下载源代码包:gcc.gnu.org2、解压:tar -xjvf gcc-4.9.0.tar.bz23、下载编译所需的依赖包: 最简单的方法,直接运行:./contrib/download_prerequisites...
分类:
系统相关 时间:
2014-06-14 20:26:14
阅读次数:
461
Description:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next ...
分类:
其他好文 时间:
2014-06-14 18:41:40
阅读次数:
265
gcc -E 能有效的帮助我们解决与宏有关的编译错误:gcc -S能获得一个C源程序文件的汇编程序;gcc -v能获得系统头文件的路径生成依赖关系:gcc -Mgcc -MM 生成不包含系统头文件的依赖关系指定链接库:gcc -L:告诉gcc可以从哪个目录查找库文件;gcc -l :用于告诉gcc在...
分类:
其他好文 时间:
2014-06-14 18:38:33
阅读次数:
231
Access restriction: The type CachedRowSetImpl is not accessible due to restriction on required library E:\MyEclipse10\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\rt.jar...
分类:
其他好文 时间:
2014-06-14 11:31:26
阅读次数:
195
[介绍]
gcc and g++分别是gnu的c & c++编译器
gcc/g++在执行编译工作的时候,总共需要4步
1.预处理,生成.i的文件
2.将预处理后的文件不转换成汇编语言,生成文件.s
3.有汇编变为目标代码(机器代码)生成.o的文件
4.连接目标代码,生成可执行程序
[参数详解]
-x language filename
设定文件所使用的语言,使后缀名无效,对...
分类:
其他好文 时间:
2014-06-14 10:19:46
阅读次数:
284
*************************************部署MYSQL*******************************************yum-yinstallgccgcc-c++gcc-g77autoconfautomakezlib*fiex*libxml*ncurses-devellibmcrypt*libtool-ltdl-devel*makecmakebison*useraddmysql-d/usr/local/mysql-s/sbin/nologintar-..
分类:
数据库 时间:
2014-06-13 21:10:19
阅读次数:
515