灯下 登录
计算机科学 / SICP / 2.3.3 Example: Representing Sets

Exercise 2.61 · 习题

Exercise 2.61: Give an implementation of

adjoin-set using the ordered representation. By analogy with

element-of-set? show how to take advantage of the ordering to produce a

procedure that requires on the average about half as many steps as with the

unordered representation.

练习 2.61:给出使用有序表示的 adjoin-set 实现。类比 element-of-set?,说明如何利用有序性给出一个平均步骤数约为无序表示一半的过程。