Given a binary tree, determine if it is a valid
binary search tree (BST).Assume a BST is defined as follows:The left subtree of
a node contains only n...
分类:
其他好文 时间:
2014-05-19 07:23:48
阅读次数:
357
转载:http://blog.chinaunix.net/uid-27570589-id-3771152.html今天在分析一个sql语句的时候 发现 left
join 与where a=b(+) 产生的执行计划不一样 而且效率也是不一样的到底怎么回事 我在网上找了篇文章分享(1.)select语...
分类:
数据库 时间:
2014-05-19 07:21:19
阅读次数:
503
基本概念 AVL树:树中任何节点的两个子树的高度最大差别为1。
AVL树的查找、插入和删除在平均和最坏情况下都是O(logn)。 AVL实现 AVL树的节点包括的几个组成对象: (01) key --
是关键字,是用来对AVL树的节点进行排序的。 (02) left -- 是左孩子。 (03) ri...
分类:
其他好文 时间:
2014-05-19 07:19:18
阅读次数:
323
浅解多线程(一)之线程入门起步本文链接确定多线程的结束时间,thread的IsAlive属性线程优先级,thread的ThreadPriority属性线程通信之Monitor类线程排队之Join多线程互斥锁Mutex信号量semaphore确定多线程的结束时间,thread的IsAlive属性在多个...
分类:
编程语言 时间:
2014-05-19 07:01:07
阅读次数:
776
oracle使用LEFT JOIN关联产生的问题在查询结果中使用CASE WHEN
无法判断查询方式一: 1 SELECT 2 CASE WHEN (SELECT CAST(SUM(CASE 3 WHEN
(ALLOCABLE_PRIME_CURRENCY_VALUE IS NULL AND ST....
分类:
数据库 时间:
2014-05-18 20:08:35
阅读次数:
1129
复习7中最后我们得到了全纯函数各阶导数的一个估计,但是这个估计是比较粗糙的,而且还仅仅是在一点处的估计,事实上利用Pompeiu公式我们还可以得到一个更深刻的结果,我们需要先来证明一个引理,即所谓的单位分解定理.
在复平面$\mathbb C$上,定义标准函数\[\theta(z)=\left...
分类:
其他好文 时间:
2014-05-18 19:30:57
阅读次数:
374
例如:有表1,表2两张相,希望通过like进行关联查询
// mysql中使用concat连接字符串
select t1.id, t1.title, t2.keyword from t1 inner join t2 on t1.title like concat('%', t2.keyword, '%');
// oracle、postgres 使用||连接字符串,其它库使用...
分类:
其他好文 时间:
2014-05-18 15:57:36
阅读次数:
242
【题目】
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
You may not alter the values in the nodes, only n...
分类:
其他好文 时间:
2014-05-18 10:22:34
阅读次数:
367
python创建二叉树,源代码如下:
#!/usr/bin/python
class node():
def __init__(self,k=None,l=None,r=None):
self.key=k;
self.left=l;
self.right=r;
def create(root):
a=raw_input('enter a key:');
if a is '#...
分类:
编程语言 时间:
2014-05-18 09:27:13
阅读次数:
384
1. 写法轻松,更新效率高:
update table1
set field1=table2.field1,
field2=table2.field2
from table2
where table1.id=table2.id
2. 常规方式,种写法相当于一个 Left join, 以外面的where为更新条数,如果不加where就是所有记录
update table1
s...
分类:
数据库 时间:
2014-05-18 06:05:00
阅读次数:
294