出题:要求将一个有序整数数组转换成最小深度的Binary Search
Tree表示;分析:由于需要是最小深度,所以BST应保持平衡,左右节点数大致相当,并且BST中当前根节点大于所有其左子树中的元素,小于所有其右子树中的元素。对于排序数组而言,中间元素必然作为根节点,然后递归对由中间元素分割的左右...
分类:
其他好文 时间:
2014-05-26 03:49:39
阅读次数:
369
inner join(等值连接) 仅仅返回两个表中联结字段相等的行 left join(左联接)
返回包含左表中的全部记录和右表中联结字段相等的记录right join(右联接) 返回包含右表中的全部记录和左表中联结字段相等的记录INNER JOIN
语法:INNER JOIN 连接两个数据表的使用...
分类:
数据库 时间:
2014-05-26 02:25:23
阅读次数:
322
例1: 批量 查询部门号为 "10" 号的并把它们打印出来 . DECLARE TYPE
emp_table_type IS TABLE OF my_emp%ROWTYPE INDEX BY BINARY_INTEGER; v_emp_table
emp_table_type;BEGIN SELE....
分类:
数据库 时间:
2014-05-26 01:26:47
阅读次数:
356
-好软件的定义就是它的体积不大不小,功能不多不少,一切都是那么的恰到好处。 -Good
software is neither too big nor too small,neither too Complex nor too
Simple,everything is so right. +点击.....
分类:
其他好文 时间:
2014-05-26 00:54:15
阅读次数:
254
publicclassMyTabControl:TabControl{protected
override void OnMouseUp(MouseEventArgs
e){if(e.Button==System.Windows.Forms.MouseButtons.Right){for(int i...
分类:
其他好文 时间:
2014-05-26 00:33:42
阅读次数:
304
BinRes.h#ifndef
_waxie_binary_resource_h_#define _waxie_binary_resource_h_#include class BinRes
{public: BinRes(); virtual ~BinRes();public: static v....
分类:
其他好文 时间:
2014-05-26 00:32:02
阅读次数:
271
Given a list, rotate the list to the right
bykplaces, wherekis non-negative.For
example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.思路:这道...
分类:
其他好文 时间:
2014-05-26 00:06:39
阅读次数:
250
Splay Tree 支持的之中操作。
插入,删除,求前驱和后即,区间更新与查询。
先来一发Splay Tree最基础的操作——伸展。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma comment(linker, "/STACK:102400...
分类:
其他好文 时间:
2014-05-25 04:27:37
阅读次数:
291
字典树Trie
Trie,又称字典树,前缀树(prefix tree),是一种树形结构,用于保存大量的字符串。
它的优点是:利用字符串的公共前缀来节约存储空间。查找、插入复杂度为O(n),n为字符串长度。
它有3个基本性质:
1. 根节点不包含字符,除根节点外每一个节点都只包含一个字符。
2. 从根节点到某一节点,路径上经过的字符连接起来,为该节点对应的字符串。...
分类:
其他好文 时间:
2014-05-24 23:49:57
阅读次数:
346
A bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as "true" or "false" respectively). And every decimal number has a binary representation which is actually a series o...
分类:
其他好文 时间:
2014-05-24 17:19:41
阅读次数:
335