Here is the source code for Data Structures and Algorithm Analysis in Java, by Mark Allen Weiss. The materials here are copyrighted.
These files go in the DataStructures subdirectory.
Here is each file.
Comparable.java: Comparable interface for pre-1.2 Java
MyInteger.java: Integer interface for pre-1.2 Java
Overflow.java: Overflow exception
Underflow.java: Underflow exception
ListNode.java: Implementation for linked list (node class)
LinkedList.java: Implementation for linked list
LinkedListItr.java: Implementation for linked list (iterator class)
CursorNode.java: Implementation for cursor linked list (node class)
CursorList.java: Implementation for cursor linked list
CursorListItr.java: Implementation for cursor linked list (iterator class)
StackAr.java: Implementation for stack: array version
StackLi.java: Implementation for stack: list version
QueueAr.java: Implementation for queue: array version
BinaryNode.java: Implementation for binary search tree (node class)
BinarySearchTree.java: Implementation for binary search tree
AvlNode.java: Implementation for AVL-tree (node declaration)
AvlTree.java: Implementation for AVL tree
Hashable.java: Hashable interface
SeparateChainingHashTable.java: Implementation for separate chaining
HashEntry.java: Implementation for quadratic probing hash table (entry class)
QuadraticProbingHashTable.java: Implementation for quadratic probing hash table
BinaryHeap.java: Implementation for binary heap
LeftHeapNode.java: Implementation for leftist heap (node class)
LeftistHeap.java: Implementation for leftist heap
BinomialNode.java: Implementation for binomial queue (node class)
BinomialQueue.java: Implementation for binomial queue
Sort.java: A collection of sorting and selection routines
DisjSets.java: Inefficient implementation of disjoint sets algorithm
DisjSetsFast.java: Efficient implementation of disjoint sets algorithm
Random.java: Implementation for random number class
SplayTree.java: Implementation for top-down splay tree
SkipNode.java: Implementation for deterministic skip list (node class)
DSL.java: Implementation for deterministic skip list
Rotations.java: Implementation for top-down red black tree (rotations class)
RedBlackNode.java: Implementation for top-down red black tree (node class)
RedBlackTree.java: Implementation for top-down red black tree
TreapNode.java: Implementation for treap (node class)
Treap.java: Implementation for treap
AANode.java: Implementation for AA-tree (node class)
AATree.java: Implementation for AA-tree