Problem 4: Binary Search Trees: Ordered Output

Write a function inorder that produces a list of the values in a binary search tree ordered from smallest to largest.

Contract and Purpose

Write the contract and purpose statement for the function inorder.

Implementation

Write the function

(inorder bst) . Demonstrate its output the sample trees you constructed for Problem 3.

Analysis

Explain BRIEFLY how the structure of the binary search tree facilitates the creation of an ordered output list of elements.