CSci 2101 Data Structures: Lab 8

Problem 1: recursive methods of a tree

Download the most recent version of the IntBST.java, IntNode.java, and the testing program written in class from this page.

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.