这里没再用到先申请大Node数组的方法了,想练练写动态内存分配和释放的,一次OK了,也没怎么出错啊,开心~
方法二 - Code:
//给出一个二叉树的先序遍历和中序遍历,输出它的后序遍历
//直接构造的方法白书已给出。这里是先递归构造二叉树,然后进行后序遍历。
#include
#include
#include
#define MAXN 1000
typedef struct nod...
分类:
其他好文 时间:
2014-08-26 13:42:56
阅读次数:
253
将序列中的数字每次+1或-1,最少的次数形成非递减序列#include #include #include using namespace std;struct node{ int Left, Right, Height; vector Lower;};typedef long long...
分类:
其他好文 时间:
2014-08-26 13:30:56
阅读次数:
178
在mysql中通常我采用int类型来存储时间。int类型只有11位。但是js里我们通常可以用var nowDate=Date.now();来获取当前时间。js里的是13位。最后三位代表毫秒数。对于 对时间要求不是很严格的情况下 我们可以对它进行简单的处理来达到记录当前时间(精确到秒)的目的//获取当...
分类:
数据库 时间:
2014-08-26 13:14:36
阅读次数:
240
上周介绍了zabbix监控cdn带宽,这次在介绍一下ansible结合docker来一键化安装与测试mysqltpcc,然后通过tpcc测试OLTP系统性能。写这个的原因就是重复性的安装太麻烦,浪费时间,而且我这里新业务不断上线,上线前使用tpcc进行OLTP测试对整体系统性能上也有了解。一、MyqlTpcc介..
分类:
数据库 时间:
2014-08-26 11:55:16
阅读次数:
639
原教程https://github.com/nswbmw/N-blog/wiki/_pages的第一章...
分类:
Web程序 时间:
2014-08-26 09:50:25
阅读次数:
405
Oracle WebLogic Server 12c: Node Manager配置与使用
在生产环境中,WebLogic服务器实例经常会跨多个管理域(domains)、物理主机(machines)或地域(geographic locations)分开部署。Node Manager是远程启动、停止或重启管理服务器和受管服务器的工具。尽管它不是必须的,但如果你的WebLogic服务器中的应用有高可用性的需求,还是推荐使用它。...
分类:
数据库 时间:
2014-08-26 00:34:55
阅读次数:
2453
LeetCode: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example:G...
分类:
其他好文 时间:
2014-08-25 22:34:54
阅读次数:
184
Clone GraphClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are l...
分类:
其他好文 时间:
2014-08-25 22:22:44
阅读次数:
237
给你N信封和1张卡片,让你从左到右选择信封(要求是右信封比左信封大)且最左边的信封要能装进卡片#include #include #include using namespace std;struct Node{ int si, sj; unsigned short n;};Node S...
分类:
其他好文 时间:
2014-08-25 20:50:04
阅读次数:
186