Lecture 10 Notes

5 4 2 1 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ike? We’ll need: constructors that allow us to build each kind of binary tree, a predicate that tests to see if a value is a representation of a binary tree, and some way of determining, given a binary tree, whether it is a leaf or an interior node, and of extracting its components. ¡ ¡§¥£¡ ©¤¢! ©¨¦! We create this interface using :   ¡"§ ¡ ¢¨¥  1©¦" 0¦¥   ¡" 3¡ § ¥   ¤¤ £¡   ¤  ¥4   ¤¢¡ ¡  ¡ ¤  ¤¥"¡ ¥§ " 1¦¤¢§ ¥  "¡4 D!©1 § 1  4   ¡  ¤ § ¤ ! £ ¡   ¡"§ ¡ ¨¥  ¡ ¨¥  ©!¢¢¤ ©¨¥ ¤ ¡"§ ¡ ¡§ £¡   is either 0§¦©¥ " ¡ ¢¨¥  ¡"§ ¡  ¤ § " §¥ ¤¢¨¥  ¤ "¡§ 26 ¡ ¡"§ ¥  ¡ ¤¢¡ consisting of a that is also a of the that is a symbol, a . £¡ !¤¤ ¡  ¤ § ¤ ! £ ¡ , and a  ¦ an 4  1  consisting of a number called the ¡¡"§ ¨¥  a ¡¡"§ ...
View Full Document

Ask a homework question - tutors are online