Creating Balanced Trees from Sorted Lists
Find the middle of the list:
(1 2 3 4 5 6 7 8 9 10)
Use BST constructors to build a BST with:
- 6 as its root
- a balanced BST built out of (1 2 3 4 5)
as its left subtree
- a balanced BST built out of (7 8 9 10)
as its right subtree
This is Exercise 8.12, p. 224. Helpful procedures:
- list-ref: built-in
- first-elements-of: defined in ch. 7
- list-tail: built-in