05 2011 档案

摘要:一个比较全面的二叉查找树 阅读全文
posted @ 2011-05-17 20:05 walfud 阅读(308) 评论(0) 推荐(0) 编辑
摘要:红黑树是一种二叉查找树, 但在每个基点上增加一个存储位表示结点的颜色, 可以说是 RED 或 BLACK. 通过对任何一条从跟到叶子的路径上各个结点着色方式的限制, 红黑树确保没有一条路径会比其他路径长出两倍, 因而是接近平衡的. 阅读全文
posted @ 2011-05-17 10:41 walfud 阅读(3868) 评论(1) 推荐(0) 编辑
摘要:// Tree.h//#ifndef TREE#define TREE#include <stddef.h>struct Node{ int key ; Node *p ; // Pointer to parent Node *l ; // Pointer to left child Node *r ; // Pointer to right child Node(int key) { this->key = key ; p = l = r = NULL ; } // Bitwise copy constructor is good enough // Replace is 阅读全文
posted @ 2011-05-16 16:14 walfud 阅读(518) 评论(0) 推荐(0) 编辑
摘要:在 SQL Server 中 --读取库中的所有表名 --读取指定表的所有列名 阅读全文
posted @ 2011-05-13 13:07 walfud 阅读(268) 评论(0) 推荐(0) 编辑
摘要:// main.cpp// Find the N-th minimum value, based on Partition#include <iostream>#include <iterator>#include <algorithm>using namespace std ;int Minimum_N(int arr[], int s, int e, int n){ // Partition int j = s ; for (int i = s ;i < e-1 ;i++) { // Exchage two integer if (arr[i] & 阅读全文
posted @ 2011-05-06 16:18 walfud 阅读(1315) 评论(0) 推荐(0) 编辑