A B C E F G H I L M N P R S T V X

A

addFirst(Comparable) - Method in class introExam.LinkedList.LL
Inserts a value at the beginning of the list.

B

BST - class introExam.BinarySearchTree.BST.
A minimal BST class using a nested BSTNode class, for the 15-111/200 Final Exam/Fall 2004
BST() - Constructor for class introExam.BinarySearchTree.BST
The default constructor: creates an empty binary search tree
BST.BSTNode - class introExam.BinarySearchTree.BST.BSTNode.
 
BST.BSTNode(Comparable) - Constructor for class introExam.BinarySearchTree.BST.BSTNode
Constructor builds the BSTNode with the supplied parameter; it has empty subtrees.
BST.BSTNode(Comparable, BST.BSTNode, BST.BSTNode) - Constructor for class introExam.BinarySearchTree.BST.BSTNode
Constructor builds the BSTNode with the supplied parameters.
balancedFactorOfNode(Comparable) - Method in class ExtendedBST
This method returns balanced factor of a given node with value If the node does not exists, return -1 Balanced Factor is defined as the absolute value of the difference in heights between left and right subtrees of the node.

C

cloneTree() - Method in class ExtendedBST
Creates and returns an exact copy of the tree.

E

ExamIO - class introExam.ExamIO.
A minimal file reading class for use within the 15-111/200 Final Exam/Fall 2004
ExamIO() - Constructor for class introExam.ExamIO
 
ExamIO.IOIterator - class introExam.ExamIO.IOIterator.
 
ExamIO.IOIterator(TypedBufferReader) - Constructor for class introExam.ExamIO.IOIterator
 
ExtendedBST - class ExtendedBST.
These methods are the candidates for the BST question
ExtendedBST() - Constructor for class ExtendedBST
 
ExtendedLL - class ExtendedLL.
These methods are the candidates for the linked list question
ExtendedLL() - Constructor for class ExtendedLL
 

F

file - Variable in class introExam.ExamIO.IOIterator
 

G

getItemsNotPresent(ExtendedLL) - Method in class ExtendedLL
Creates and returns a new list, which contains exactly those items that are not present in this list, but that are present in the otherList.
getLeft() - Method in class introExam.BinarySearchTree.BST.BSTNode
Returns reference to the left child, or null, if none.
getNext() - Method in class introExam.LinkedList.LL.LLNode
Returns reference to the next LLNode
getRight() - Method in class introExam.BinarySearchTree.BST.BSTNode
Returns reference to the right child, or null, if none.
getValue() - Method in class introExam.BinarySearchTree.BST.BSTNode
Returns reference to the value of the object.
getValue() - Method in class introExam.LinkedList.LL.LLNode
Returns reference to the value of the object.

H

hasNext - Variable in class introExam.ExamIO.IOIterator
 
hasNext() - Method in class introExam.ExamIO.IOIterator
 
head - Variable in class introExam.LinkedList.LL
 

I

insert(Comparable) - Method in class introExam.BinarySearchTree.BST
Inserts a value into the proper position of a binary search tree.
insert(BST.BSTNode, Comparable) - Method in class introExam.BinarySearchTree.BST
This is a helper method -- no further description available
intersection(ExtendedLL) - Method in class ExtendedLL
Creates and returns a new list, which contains exactly those items that are present in both lists
introExam - package introExam
 
introExam.BinarySearchTree - package introExam.BinarySearchTree
 
introExam.LinkedList - package introExam.LinkedList
 
isPerfect() - Method in class ExtendedBST
Returns true if, and only if, all leaves of the tree are at the same level (are the same distance from the root) and the tree has the maximum number of nodes for its depth (each node has exactly 0 or two children), and false otherwise.
isSubset(ExtendedLL) - Method in class ExtendedLL
This method returns true if and only if the otherList is a subset of this list and false otherwise.

L

LL - class introExam.LinkedList.LL.
A minimal LL class using a nested LLNode class, for the 15-111/200 Final Exam/Fall 2004
LL() - Constructor for class introExam.LinkedList.LL
Default constructor: creates empty list
LL.LLNode - class introExam.LinkedList.LL.LLNode.
 
LL.LLNode(Comparable) - Constructor for class introExam.LinkedList.LL.LLNode
Constructor builds the LLNode with the supplied parameter; it is followed by an empty list.
LL.LLNode(Comparable, LL.LLNode) - Constructor for class introExam.LinkedList.LL.LLNode
Constructor builds the LLNode with the supplied parameters.
left - Variable in class introExam.BinarySearchTree.BST.BSTNode
 
line - Variable in class introExam.ExamIO.IOIterator
 

M

maxLeafLevel() - Method in class ExtendedBST
Returns the level of the leaf that is farthest from the top (root) of the tree.
minLeafLevel() - Method in class ExtendedBST
Returns the level of the leaf that is closest to the top (root) of the tree.

N

next() - Method in class introExam.ExamIO.IOIterator
 
next - Variable in class introExam.LinkedList.LL.LLNode
 
niceTreeString(BST.BSTNode, String) - Method in class introExam.BinarySearchTree.BST
This is a helper method -- no further description available

P

printLeavesAtLevel(int) - Method in class ExtendedBST
Prints to the console a list of all items organized at the specified level of the tree.
printPath(Comparable) - Method in class ExtendedBST
Prints the value at each node between and including the root and the supplied keyValue.

R

readFile(String) - Static method in class introExam.ExamIO
Returns an Iterator that produces, by calling next, a String containing the next line in the file.
remove() - Method in class introExam.ExamIO.IOIterator
 
removeAllGreaterItems(Comparable) - Method in class ExtendedLL
Removes each and every item greater than the keyItem from the list.
removeAllMatchingItems(Comparable) - Method in class ExtendedLL
Removes each and every item equal to the keyItem from the list.
removeEvenItems() - Method in class ExtendedLL
This removes items with even indexes from the list.
removeOddItems() - Method in class ExtendedLL
Removes items with odd indexes from the list.
reverse() - Method in class ExtendedLL
Creates and returns a new linked list referencing the same items as the original list, except organizing them in the opposite order.
right - Variable in class introExam.BinarySearchTree.BST.BSTNode
 
root - Variable in class introExam.BinarySearchTree.BST
 

S

setLeft(BST.BSTNode) - Method in class introExam.BinarySearchTree.BST.BSTNode
Sets the left-child reference of this object to the parameter object.
setNext(LL.LLNode) - Method in class introExam.LinkedList.LL.LLNode
Sets the next reference of this object to the paramter object
setRight(BST.BSTNode) - Method in class introExam.BinarySearchTree.BST.BSTNode
Sets the right-child reference of this object to the parameter object.

T

toString() - Method in class introExam.BinarySearchTree.BST.BSTNode
Returns string representation of the object
toString() - Method in class introExam.BinarySearchTree.BST
Provides a nice string represention of a BST.
toString() - Method in class introExam.LinkedList.LL.LLNode
Returns string representation of the object
toString() - Method in class introExam.LinkedList.LL
Returns a string representation of the list

V

value - Variable in class introExam.BinarySearchTree.BST.BSTNode
Note final access modifier: cannot be changed! Also, there is no setter for value.
value - Variable in class introExam.LinkedList.LL.LLNode
Note final access modifier: cannot be changed! As a result, there is no setter for value.

X

xOr(ExtendedLL) - Method in class ExtendedLL
Creates and returns a new list, which contains exactly those items that are present in exactly one of the two lists, but not both.

A B C E F G H I L M N P R S T V X