CSci 2101 Data Structures: Lab 7

Problem 1: recursive methods of a tree

Download the most recent version of the and written in class from this page. You may download the TestIntBST here or use the one you wrote in class on Thursday.

Write the following recursive methods:

Recall that in order to write recursive methods for a tree you have to write recursive methods of the nodes. Please test your methods thoroughly and submit your test cases.

Problem 2: recursive methods of linked lists

Use the linked lists implementation here. Recursion in linked lists is similar to that in a tree: you need to write the recursive method in the Node class and call it in LinkedList class on the first node.

Write the following recursive methods:

This is a lab from CSci 2101 course.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.