1、首先用PL/SQL创建package1 create or replace package excuteBatchOperate2 as3 type sqlStr_Array is table of varchar2(1000) index by binary_integer;4 proce.....
分类:
数据库 时间:
2015-05-09 14:48:16
阅读次数:
159
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:
其他好文 时间:
2015-05-09 13:29:28
阅读次数:
101
主库添加log-bin-index 参数后,从库报这个错误:Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log in...
分类:
其他好文 时间:
2015-05-09 13:03:27
阅读次数:
204
reset slave会清除从库的所有复制信息。一般应用场景:如切换为不同的Master, 主从重做等; 1. 命令在slave上执行,执行前一定要stop slave。 2. 执行reset slave后,会清除复制相关的所有信息,包括:master.info, relay-log.info,.....
分类:
其他好文 时间:
2015-05-09 13:02:05
阅读次数:
174
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
基本思路:
中序遍历的过程,与有序链表的顺序是一一对应的。
采用中序遍历构造进树的构造。
并利用取值范围,确定,根的位置,以及子树的范围。
故需要遍历整个链表,求...
分类:
其他好文 时间:
2015-05-09 11:43:53
阅读次数:
140
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2015-05-08 18:18:47
阅读次数:
138
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
基本思路:
由于队列已经进行排序,每次取其中点,作为树的根。
即可建得一棵平衡二叉树。
/**
* Definition for a binary tree node.
*...
分类:
其他好文 时间:
2015-05-08 18:14:35
阅读次数:
111
1 # Definition for a binary tree node. 2 # class TreeNode: 3 # def __init__(self, x): 4 # self.val = x 5 # self.left = None 6 # ...
分类:
其他好文 时间:
2015-05-08 18:07:55
阅读次数:
111
错误信息: [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_funct...
分类:
其他好文 时间:
2015-05-08 16:43:07
阅读次数:
129
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
基本思路:
人中序和后序遍历结果中,构造出二叉树。
中序遍历为: {左子树} 根 {右子树}
后序遍...
分类:
其他好文 时间:
2015-05-08 16:34:15
阅读次数:
135