题目:二叉树中有两个节点对换了值,恢复他们。思路:因为中序遍历是有序的,如果中序遍历后的数组出现乱序,说明就是交换的。从前往后,第一次乱序的第一个,后最后一次乱序的后一个,然后把这两个值对换就好了。想了个非常挫的办法。先中序遍历Binary Tree Inorder Traversal,然后在数组中...
分类:
其他好文 时间:
2014-11-27 00:08:40
阅读次数:
240
坏块的发生,很罕见,但生产系统偶尔还是会出现。如果有物理备份,处理起来相对简单,直接进行块级recover即可,但如果只有逻辑备份呢?处理起来要分四种情况,在此总结一下:一、块的data部分坏了,在sql执行扫描到这个块的时候会报ORA-01578:ERRORatline1:ORA-01578:ORACLEd..
分类:
数据库 时间:
2014-11-26 16:46:45
阅读次数:
342
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 ...
分类:
其他好文 时间:
2014-11-26 13:58:49
阅读次数:
255
#include #include #include #include using namespace std;bool mycmp(const string& a, const string& b) { string ta = a + b; string tb = b + a; ...
分类:
其他好文 时间:
2014-11-25 00:12:26
阅读次数:
281
You can recover MySQL database server password with following five easy steps. Step # 1: Stop the MySQL server process. Step # 2: Start the MySQL (mys...
分类:
数据库 时间:
2014-11-23 23:01:13
阅读次数:
390
缘起:线上的go service 挂了,无法启动。原因:采用的第三方库有个bug, 在go携程里面执行task的时候会产生out of range 的panic, 而我又把任务队列每次加载的时候重做一次,导致无法启动。分析:go携程里面某个task执行失败,不应该影响service的正常运行。解决:...
分类:
其他好文 时间:
2014-11-19 15:43:30
阅读次数:
163
一:环境介绍主库(RAC)IP地址:192.168.1.210,192.168.1.211操作系统版本:ole5.864bit数据库版本:11.2.0.464bit数据库sid名:MECBS1,MECBS2数据库主机名:node1,node2数据库db_unique_name:MECBS备库1物理备库(只安装oracle数据库软件,无需建库)IP地址:192.168.1.219操作系..
分类:
数据库 时间:
2014-11-15 06:41:09
阅读次数:
316
I‘m so careless I deleted a Java web project in eclipse. the only thing I have is a war file which I got from server. Thanks to?Procyon / Java Decompiler, I recovered all java source code from wa...
分类:
编程语言 时间:
2014-11-14 18:08:20
阅读次数:
160
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 ...
分类:
其他好文 时间:
2014-11-09 07:30:45
阅读次数:
155
数据库版本:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0主库ip:192.168.133.133 instance_name:orcl service_name:pdb 主机名:dg1备库ip:192.168.133.134...
分类:
数据库 时间:
2014-11-07 11:08:20
阅读次数:
396