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 .

最新文章

  1. 图解javascript
  2. == 区别 equals
  3. java_类泛型承继方法
  4. oschina企业应用
  5. 理解Python中的装饰器
  6. 关于一些php规范
  7. web-garden 和 web-farm 有什么不同 ?
  8. Ubungu 18.04安装MySQL 5.7.24
  9. hdu 1686 Oulipo 【KMP】(计算模式串匹配的次数——与已匹配的字串可以有交集)
  10. [No0000139]轻量级文本编辑器,Notepad最佳替代品:Notepad++
  11. 基于docker搭建jumpserver堡垒机
  12. 使用Pypi镜像源加速第三方库的安装
  13. Examining Huge Pages or Transparent Huge Pages performance
  14. 【咸鱼教程】protobuf在websocket通讯中的使用
  15. Linux Mint KDE上安装fcitx+sougou输入法
  16. python清空列表的方法
  17. 《大象Think in UML》阅读笔记之二
  18. ORA-12560: TNS: 协议适配器错误的解决方法
  19. Spring Tool Suite 配置和使用
  20. List、Set、Map下各类型的对比

热门文章

  1. Filter 详解
  2. android编程取消标题栏方法(appcompat_v7、Theme.NoTitleBar)
  3. gfnormal 域名 是阿里云的高防IP
  4. 【POJ 1947】 Rebuilding Roads
  5. 计算属性computed 与methods
  6. hash学习
  7. Ubuntu 16.04安装Wireshark进行抓包
  8. sql server 分组排序
  9. POJ3233:Matrix Power Series(矩阵快速幂+递推式)
  10. unsign 字段相减出现负数解决方法