Here is the source code for Data Structures and Algorithm Analysis in Java (Second Edition), by Mark Allen Weiss. The materials here are copyrighted.
Requires Java 5.
Fig01_02.java: A simple recursive routine with a test program
Fig01_03.java: An example of infinite recursion
Fig01_04.java: Recursive routine to print numbers, with a test program
MemoryCell.java: MemoryCell class
TestIntCell.java: IntCell test program
TestMemoryCell.java: MemoryCell test program
MaxSumTest.java: Various maximum subsequence sum algorithms
Fig02_09.java: Test program for binary search
Fig02_10.java: Euclid's algorithm, with a test program
Fig02_11.java: Recursive exponentiation algorithm, with a test program
RemoveEvens.java: Remove even numbers in a collection
MyArrayList.java: ArrayList implementation
MyLinkedList.java: LinkedList implementation
BinarySearchTree.java: Binary search tree
WordLadder.java: Word Ladder Program and Word Changing Utilities
SeparateChainingHashTable.java: Implementation for separate chaining
QuadraticProbingHashTable.java: Implementation for quadratic probing hash table
LeftistHeap.java: Leftist heaps
BinomialQueue.java: Binomial queues
Sort.java:Program for sorting and selection routines
DisjSets.java: Efficient implementation of disjoint sets algorithm
WordLadder.java: Word Ladder Program and Word Changing Utilities
Fig10_38.java: Simple matrix multiplication algorithm with a test program
Fig10_40.java: Algorithms to compute Fibonacci numbers
Fig10_43.java: Inefficient recursive algorithm (see text)
Fig10_45.java: Better algorithm to replace fig10_43 (see text)
Fig10_53.java: All-pairs algorithm, with a test program
Random.java: Implementation for random number class
Fig10_62.java: Randomized primality testing algorithm, with a test program
DSL.java: Determinstic skip lists
RedBlackTree.java: Red black trees