CS2402 Lab 5: Building Lists and Binary Search Trees - Prof. Olac Fuentes, Lab Reports of Data Structures and Algorithms

The instructions for lab 5 in cs2402, which involves writing methods related to lists and binary search trees of strings. The lab includes instructions for creating methods to determine the height of a binary tree, building a binary search tree and an avl tree from an unordered list, building a minimum-height binary search tree from an ordered list, and building an ordered list from a binary search tree. The lab also includes instructions for testing the methods using text files from lab 4.

Typology: Lab Reports

Pre 2010

Uploaded on 08/19/2009

koofers-user-9op
koofers-user-9op 🇺🇸

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CS2402
Spring 2009
Lab 5
Lists and Binary Search Trees
Due Tuesday, March 24, 2009
Instructions
Write the following methods related to lists and binary search trees of strings:
a) A method to determine the height of a binary tree
b) A method that receives an unordered list and builds a binary search tree with the elements
of that list.
c) A method that receives an unordered list and builds an AVL tree with the elements of that
list.
d) A method that receives an ordered list and builds a minimum-height binary search tree
with the elements in the list.
e) A method that receives a binary search tree and builds an ordered list with the elements in
the tree.
f) A main method to demonstrate that all your other methods work properly.
Test your methods using the same text files you used for lab 4.

Partial preview of the text

Download CS2402 Lab 5: Building Lists and Binary Search Trees - Prof. Olac Fuentes and more Lab Reports Data Structures and Algorithms in PDF only on Docsity!

CS

Spring 2009

Lab 5

Lists and Binary Search Trees

Due Tuesday, March 24, 2009

Instructions

Write the following methods related to lists and binary search trees of strings: a) A method to determine the height of a binary tree b) A method that receives an unordered list and builds a binary search tree with the elements of that list. c) A method that receives an unordered list and builds an AVL tree with the elements of that list. d) A method that receives an ordered list and builds a minimum-height binary search tree with the elements in the list. e) A method that receives a binary search tree and builds an ordered list with the elements in the tree. f) A main method to demonstrate that all your other methods work properly.

Test your methods using the same text files you used for lab 4.