这是我的页面头部

书签

大学看过的好多好书,都记不得书名了。以至于查资料的时候都查不到。以后需得做好书签了。

《linux 操作系统内核分析》陈莉君 编著

讲了 socket 协议栈的数据结构

programming abstractions in c》 by Eric Roberts Addison-Wesley,1997 

程序设计抽象思想:C语言描述》闪四清译,清华大学出版社。

13.2.1

众多对二叉树算法的介绍中,多以此开题:“二叉树是这样的这棵树”。我学了好多年都没有弄明白二叉树怎么用。

这本书中“The underlying motivation for using binary search trees” 从数组的二分查找入手,阐述了二叉树的思想:

1)链表之于数组,减少了增删操作时高昂的开销。但也失去了二分查找的便利。

2)为标记二分查找的点,在每个结点中引入了两个新的指针,用以指向元素的前后两个子区间内的二分元素的位置。这便链表元素中指向孩子结点的指针

3)二叉树前序遍历得到的便是数组方式存储的数据。

12.3 使用链表表示大整数

《 data structures and program design in c++  》  Robert L.Kruse Alexander J.Ryba, 2000 by Prentice-Hall, Inc.

11.4 Red-Black Trees 介绍了红黑树的渊源:红黑树由b-tree 进化而来。不同于 b-tree 用于处理外存中的数据,红黑树用于处理内存中的数据。红黑树中每个 black node 代表了 b-tree 中的一个 leaf node。

" In general, however, we may use any ordered structure we wish for storing the entries in each b_tree node. Small binary search trees turn out to be an excellent choice. "

书中给出了红黑树的部分实现代码。不同于 STL 和 linux,这棵树没有父结点。因而代码的实现比较简洁。易于学习。
"we shall consider that all the empty subtrees( corresponding to NULL links ) are colored black."
(相关链接:Beyer, R. "Symmetric Binary B-Trees: Data Structures and Maintenance Algorithms." Acta Informat. 1, 290-306, 1972. )


posted @ 2009-06-10 22:22  范晨鹏  阅读(261)  评论(0编辑  收藏  举报