Docsity

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

Toggle sidebar
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.