previous | index | next

Empty Trees

Q: What are the left and right subtrees of the BST whose root is 3?

A: Empty trees

Q: How to represent an empty tree?

A: With an empty list.

Constructor:

     (define make-empty-tree
       (lambda () '()))
Empty Tree Predicate:
     (define empty-tree? null?)

previous | index | next