Binary Tree Zigzag Level Order TraversalGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then...
分类:
其他好文 时间:
2014-08-08 23:48:36
阅读次数:
307
Problem Description:
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 is pretty straigh...
分类:
其他好文 时间:
2014-08-08 21:22:36
阅读次数:
315
QModelIndexindex=ui.tree_FileLocal->indexAt(pos);QMenu*pMenu=newQMenu(ui.tree_FileLocal);if(ui.tree_FileLocal->columnCount()==7){QAction*refresh=pMenu->addAction(tr("刷新(&Y)"));refresh->setShortcut(Qt::Key_F5);connect(refresh,SIGNAL(trigger..
分类:
其他好文 时间:
2014-08-08 18:31:06
阅读次数:
333
这一节学习树状图的制作。树状图的制作和集群图完全相同,经过这两种 layout 转换后的数据也很相似。...
分类:
Web程序 时间:
2014-08-08 18:18:36
阅读次数:
356
什么是后缀数组后缀树(Suffix tree)是一种数据结构,能快速解决很多关于字符串的问题,缺点是算法复杂难懂且容易出错。而后缀数组、后缀自动机、后缀仙人掌都是后缀树的替代品。后缀数组 Suffix Array 是一个一维数组,它将字符串S的n个后缀从小到大排序后把排好序的后缀的开头位置顺次放入数...
分类:
其他好文 时间:
2014-08-08 18:00:46
阅读次数:
447
DB2数据库的内置数据类型主要分成数值型(numeric)、字符串型(character string)、图形字符串(graphic string)、二进制字符串型(binary string)或日期时间型(datetime)。还有一种叫做 DATALINK 的特殊数据类型。DATALINK 值包含...
分类:
数据库 时间:
2014-08-08 17:22:26
阅读次数:
346
http://acm.hdu.edu.cn/showproblem.php?pid=4925
尽量让每棵苹果树周围都施肥,每次找到一个空地种上苹果树之后,使其周围的空地施肥,不再种苹果树。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#in...
分类:
移动开发 时间:
2014-08-08 16:17:46
阅读次数:
260
Problem Description
I’ve bought an orchard and decide to plant some apple trees on it. The orchard seems like an N * M two-dimensional map. In each grid, I can either plant an apple tree to get one...
分类:
移动开发 时间:
2014-08-08 16:13:06
阅读次数:
281
题目:hdu4925Apple Tree(找规律)
题目大意:给出N* M 的矩阵,然后每个格子要不种苹果,要不施肥:在(X,Y)施肥后,它上下左右的苹果树的产量会翻倍。种了苹果数,产量为1.求这样的N * M个矩阵能得到的最大的苹果数。
解题思路:
对于2 * 2的矩阵: X代表施肥 , 有数字代表种树 X 2 这样是最好的。各自上的数字...
分类:
移动开发 时间:
2014-08-08 12:50:25
阅读次数:
205
/**
* 功能:文件的拷贝
* 时间:2014年8月8日07:40:21
* 作者:cutter_point
*/
#include
#include
#include
#include
using namespace std;
int main()
{
ifstream fin("test1.jpg", ios::binary);
ofstream fout("fuzhi...
分类:
编程语言 时间:
2014-08-08 09:43:36
阅读次数:
263