10.3 Implementing pointers and objects and 10.4 Representing rooted trees
Algorithms
10.3 Implementing pointers and objects and 10.4 Representing rooted trees
Allocating and freeing objects
分配和释放对象
it is useful to manage the storage of objects not currently used in the linked -list representation so that one can be allocated .
In some systems, a garbage collec- tor is responsible for determining which objects are unused.
一些系统中,垃圾回收机制负责决定哪个对象没有被用到。
we keep the free objects in a singly linked list ,which we call the free list .
Note that each object in the representation is either in list L or in the free list ,but not in both .
The free list initially contains all n unallocated objects . Once the free list has been exhausted ,running the allocate-object procedure signals an error .
10.4 Representing rooted trees
homogeneous 同类的
we first look at binary trees ,and then we present a method for rooted trees in which nodes can have an arbitrary number of children .
二分树,根数:有任意数量的孩子
Binary trees
Rooted trees with unbounded branching
1. x.left-child points to the leftmost child of node x , and
2. x.right-sibling points to the sibling of x immediately to its right .
最新文章
- 图解javascript
- == 区别 equals
- java_类泛型承继方法
- oschina企业应用
- 理解Python中的装饰器
- 关于一些php规范
- web-garden 和 web-farm 有什么不同 ?
- Ubungu 18.04安装MySQL 5.7.24
- hdu 1686 Oulipo 【KMP】(计算模式串匹配的次数——与已匹配的字串可以有交集)
- [No0000139]轻量级文本编辑器,Notepad最佳替代品:Notepad++
- 基于docker搭建jumpserver堡垒机
- 使用Pypi镜像源加速第三方库的安装
- Examining Huge Pages or Transparent Huge Pages performance
- 【咸鱼教程】protobuf在websocket通讯中的使用
- Linux Mint KDE上安装fcitx+sougou输入法
- python清空列表的方法
- 《大象Think in UML》阅读笔记之二
- ORA-12560: TNS: 协议适配器错误的解决方法
- Spring Tool Suite 配置和使用
- List、Set、Map下各类型的对比