
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 1
This page cannot be seen from the preview
Don't miss anything!

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.