Source Code for Data Structures and Algorithm Analysis in Java (Third Edition)

Here is the source code for Data Structures and Algorithm Analysis in Java (Third Edition), by Mark Allen Weiss. The materials here are copyrighted.

Requires Java 7.

Complete Bundle

Available soon

Individual Files

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

IntCell.java: IntCell class

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

Fig02_12.java: GCD timing 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

AvlTree.java: AVL trees

WordLadder.java: Word Ladder Program and Word Changing Utilities

SeparateChainingHashTable.java: Implementation for separate chaining

QuadraticProbingHashTable.java: Implementation for quadratic probing hash table

CuckooHashTable.java: Implementation for cuckoo hash table

HashFamily.java: Hash family interface for cuckoo hash table

StringHashFamily.java: String hash family implementation for cuckoo hash table

BinaryHeap.java: Binary heaps

LeftistHeap.java: Leftist heaps

BinomialQueue.java: Binomial queues

Sort.java:Program for sorting and selection routines

RadixSort.java:Radix sort

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_46.java: Dynamic programming algorithm for optimal chain matrix multiplication, with a test program

Fig10_53.java: All-pairs algorithm, with a test program

Random.java: Implementation for random number class

Fig10_63.java: Randomized primality testing algorithm, with a test program

SplayTree.java: Splay trees

RedBlackTree.java: Red black trees

Treap.java: Treap

SuffixArray.java: Suffix array

KdTree.java: Implementation and test program for k-d trees

PairingHeap.java: Pairing heaps