

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


The third quiz for the course will be on Wednesday, Oct 10, during your lab session. The following list provides more information about the quiz:
The following exercises cover the material to be included in this quiz. Solutions to these exercises will not be provided, but you are welcome to discuss your solutions with the TA or instructor during office hours. We strongly recommend you do not use Eclipse to write the code associated with these exercises. Try to answer the exercises in a piece of paper and then use Eclipse to verify your solutions. This approach will better prepare you for the quiz.
Some recursion problems require an auxiliary method. For example, a recursive implementation for the size() method of a linked list calls for an auxiliary method that takes as parameter a reference to a node. Keep this in mind when solving the problems below.
A. Linked Lists
public class LinkedList
private Node head; }
B. Binary Trees
The following Java class definition for a binary tree will be used to answer the questions that follow. Unlike project 3, the following tree is not polymorphic. .You may not add any variables (instance or static) to the class in order to implement the questions below.
public class BinarySearchTree <E extends Comparable