Held Wednesday, April 26, 2000
Today we will explore techinques used to print trees and convert trees to lists.
A / \ B C / \ D E | F
printdfsthat prints in postfix. That is, a node should be printed after its children.
printdfsthat prints its children in right-to-left order.
printbfsthat prints its children in right-to-left order.
printOutline as a guide, write a method,
printWithEdges that includes the edges in the
outline. For example, instead of
A B Q E T X Y Z Sit should print something more like the following
A +-B | +-Q | +-E +-T | +-X | | | +-Y | | | +-Z | +-S
Update the interfaces and the implementations to support
That is, each tree should be able to report on the number of elements
it contains and the number of levels it contains.
Tuesday, 18 January 2000
Tuesday, 25 April 2000
Wednesday, 26 April 2000
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/2000S/Outlines/outline.47.html
Source text last modified Wed Apr 26 09:55:15 2000.
This page generated on Wed Apr 26 09:57:01 2000 by Siteweaver. Validate this page's HTML.
Contact our webmaster at firstname.lastname@example.org