Accumulator 
The Accumulator class is a data type for computing the running
mean, sample standard deviation, and sample variance of a stream of real
numbers.

AcyclicLP 
The AcyclicLP class represents a data type for solving the
singlesource longest paths problem in edgeweighted directed
acyclic graphs (DAGs).

AcyclicSP 
The AcyclicSP class represents a data type for solving the
singlesource shortest paths problem in edgeweighted directed acyclic
graphs (DAGs).

AdjMatrixEdgeWeightedDigraph 
The AdjMatrixEdgeWeightedDigraph class represents an edgeweighted
digraph of vertices named 0 through V  1, where each
directed edge is of type DirectedEdge and has a realvalued weight.

AllowFilter 
The AllowFilter class provides a client for reading in an allowlist
of words from a file; then, reading in a sequence of words from standard input,
printing out each word that appears in the file.

Allowlist 
The Allowlist class provides a client for reading in
a set of integers from a file; reading in a sequence of integers
from standard input; and printing to standard output those
integers not in the allowlist.

Alphabet 

AmericanFlag 
The AmericanFlag class provides static methods for sorting an
array of extended ASCII strings or integers inplace using
American flag sort.

AmericanFlagX 
The AmericanFlagX class provides static methods for sorting an
array of extended ASCII strings or integers inplace using
American Flag sort.

Arbitrage 
The Arbitrage class provides a client that finds an arbitrage
opportunity in a currency exchange table by constructing a
completedigraph representation of the exchange table and then finding
a negative cycle in the digraph.

AssignmentProblem 
The AssignmentProblem class represents a data type for computing
an optimal solution to an nbyn assignment problem.

Average 
The Average class provides a client for reading in a sequence
of real numbers and printing out their average.

AVLTreeST<Key extends Comparable<Key>,Value> 
The AVLTreeST class represents an ordered symbol table of
generic keyvalue pairs.

Bag<Item> 
The Bag class represents a bag (or multiset) of
generic items.

BellmanFordSP 
The BellmanFordSP class represents a data type for solving the
singlesource shortest paths problem in edgeweighted digraphs with
no negative cycles.

BinaryDump 
The BinaryDump class provides a client for displaying the contents
of a binary file in binary.

BinaryIn 
Binary input.

BinaryInsertion 
The BinaryInsertion class provides a static method for sorting an
array using an optimized binary insertion sort with half exchanges.

BinaryOut 
Binary output.

BinarySearch 
The BinarySearch class provides a static method for binary
searching for an integer in a sorted array of integers.

BinarySearchST<Key extends Comparable<Key>,Value> 
The BST class represents an ordered symbol table of generic
keyvalue pairs.

BinaryStdIn 
Binary standard input.

BinaryStdOut 
Binary standard output.

BinomialMinPQ<Key> 
The BinomialMinPQ class represents a priority queue of generic keys.

Bipartite 
The Bipartite class represents a data type for
determining whether an undirected graph is bipartite or whether
it has an oddlength cycle.

BipartiteMatching 
The BipartiteMatching class represents a data type for computing a
maximum (cardinality) matching and a
minimum (cardinality) vertex cover in a bipartite graph.

BipartiteX 
The BipartiteX class represents a data type for
determining whether an undirected graph is bipartite or whether
it has an oddlength cycle.

BlockFilter 
The BlockFilter class provides a client for reading in a blocklist
of words from a file; then, reading in a sequence of words from standard input,
printing out each word that does not appear in the file.

BoruvkaMST 
The BoruvkaMST class represents a data type for computing a
minimum spanning tree in an edgeweighted graph.

BoyerMoore 
The BoyerMoore class finds the first occurrence of a pattern string
in a text string.

BreadthFirstDirectedPaths 
The BreadthDirectedFirstPaths class represents a data type for
finding shortest paths (number of edges) from a source vertex s
(or set of source vertices) to every other vertex in the digraph.

BreadthFirstPaths 
The BreadthFirstPaths class represents a data type for finding
shortest paths (number of edges) from a source vertex s
(or a set of source vertices)
to every other vertex in an undirected graph.

BST<Key extends Comparable<Key>,Value> 
The BST class represents an ordered symbol table of generic
keyvalue pairs.

BTree<Key extends Comparable<Key>,Value> 
The BTree class represents an ordered symbol table of generic
keyvalue pairs.

Cat 
The Cat class provides a client for concatenating the results
of several text files.

CC 
The CC class represents a data type for
determining the connected components in an undirected graph.

ClosestPair 
The ClosestPair data type computes a closest pair of points
in a set of n points in the plane and provides accessor methods
for getting the closest pair of points and the distance between them.

CollisionSystem 
The CollisionSystem class represents a collection of particles
moving in the unit box, according to the laws of elastic collision.

Complex 
The Complex class represents a complex number.

Count 
The Count class provides an Alphabet client for reading
in a piece of text and computing the frequency of occurrence of each
character over a given alphabet.

Counter 
The Counter class is a mutable data type to encapsulate a counter.

CPM 
The CPM class provides a client that solves the
parallel precedenceconstrained job scheduling problem
via the critical path method.

Cycle 
The Cycle class represents a data type for
determining whether an undirected graph has a simple cycle.

Date 
The Date class is an immutable data type to encapsulate a
date (day, month, and year).

DeDup 
The DeDup class provides a client for reading in a sequence of
words from standard input and printing each word, removing any duplicates.

DegreesOfSeparation 
The DegreesOfSeparation class provides a client for finding
the degree of separation between one distinguished individual and
every other individual in a social network.

DepthFirstDirectedPaths 
The DepthFirstDirectedPaths class represents a data type for
finding directed paths from a source vertex s to every
other vertex in the digraph.

DepthFirstOrder 
The DepthFirstOrder class represents a data type for
determining depthfirst search ordering of the vertices in a digraph
or edgeweighted digraph, including preorder, postorder, and reverse postorder.

DepthFirstPaths 
The DepthFirstPaths class represents a data type for finding
paths from a source vertex s to every other vertex
in an undirected graph.

DepthFirstSearch 
The DepthFirstSearch class represents a data type for
determining the vertices connected to a given source vertex s
in an undirected graph.

Digraph 
The Digraph class represents a directed graph of vertices
named 0 through V  1.

DigraphGenerator 
The DigraphGenerator class provides static methods for creating
various digraphs, including ErdosRenyi random digraphs, random DAGs,
random rooted trees, random rooted DAGs, random tournaments, path digraphs,
cycle digraphs, and the complete digraph.

DijkstraAllPairsSP 
The DijkstraAllPairsSP class represents a data type for solving the
allpairs shortest paths problem in edgeweighted digraphs
where the edge weights are nonnegative.

DijkstraSP 
The DijkstraSP class represents a data type for solving the
singlesource shortest paths problem in edgeweighted digraphs
where the edge weights are nonnegative.

DijkstraUndirectedSP 
The DijkstraUndirectedSP class represents a data type for solving
the singlesource shortest paths problem in edgeweighted graphs
where the edge weights are nonnegative.

DirectedCycle 
The DirectedCycle class represents a data type for
determining whether a digraph has a directed cycle.

DirectedCycleX 
The DirectedCycleX class represents a data type for
determining whether a digraph has a directed cycle.

DirectedDFS 
The DirectedDFS class represents a data type for
determining the vertices reachable from a given source vertex s
(or set of source vertices) in a digraph.

DirectedEdge 

DirectedEulerianCycle 
The DirectedEulerianCycle class represents a data type
for finding an Eulerian cycle or path in a digraph.

DirectedEulerianPath 
The DirectedEulerianPath class represents a data type
for finding an Eulerian path in a digraph.

DoublingRatio 
The DoublingRatio class provides a client for measuring
the running time of a method using a doubling ratio test.

DoublingTest 
The DoublingTest class provides a client for measuring
the running time of a method using a doubling test.

Draw 
Draw.

Edge 

EdgeWeightedDigraph 
The EdgeWeightedDigraph class represents an edgeweighted
digraph of vertices named 0 through V  1, where each
directed edge is of type DirectedEdge and has a realvalued weight.

EdgeWeightedDirectedCycle 
The EdgeWeightedDirectedCycle class represents a data type for
determining whether an edgeweighted digraph has a directed cycle.

EdgeWeightedGraph 
The EdgeWeightedGraph class represents an edgeweighted
graph of vertices named 0 through V – 1, where each
undirected edge is of type Edge and has a realvalued weight.

EulerianCycle 
The EulerianCycle class represents a data type
for finding an Eulerian cycle or path in a graph.

EulerianPath 
The EulerianPath class represents a data type
for finding an Eulerian path in a graph.

FarthestPair 
The FarthestPair data type computes the farthest pair of points
in a set of n points in the plane and provides accessor methods
for getting the farthest pair of points and the distance between them.

FenwickTree 
Created by ricardodpsx@gmail.com on 4/01/15.

FFT 
The FFT class provides methods for computing the
FFT (FastFourier Transform), inverse FFT, linear convolution,
and circular convolution of a complex array.

FibonacciMinPQ<Key> 

FileIndex 
The FileIndex class provides a client for indexing a set of files,
specified as commandline arguments.

FlowEdge 
The FlowEdge class represents a capacitated edge with a
flow in a FlowNetwork .

FlowNetwork 
The FlowNetwork class represents a capacitated network
with vertices named 0 through V  1, where each directed
edge is of type FlowEdge and has a realvalued capacity
and flow.

FloydWarshall 
The FloydWarshall class represents a data type for solving the
allpairs shortest paths problem in edgeweighted digraphs with
no negative cycles.

FordFulkerson 
The FordFulkerson class represents a data type for computing a
maximum stflow and minimum stcut in a flow
network.

FrequencyCounter 
The FrequencyCounter class provides a client for
reading in a sequence of words and printing a word (exceeding
a given length) that occurs most frequently.

GabowSCC 
The GabowSCC class represents a data type for
determining the strong components in a digraph.

GaussianElimination 
The GaussianElimination data type provides methods
to solve a linear system of equations Ax = b,
where A is an mbyn matrix
and b is a length n vector.

GaussJordanElimination 
The GaussJordanElimination data type provides methods
to solve a linear system of equations Ax = b,
where A is an nbyn matrix
and b is a length n vector.

Genome 
The Genome class provides static methods for compressing
and expanding a genomic sequence using a 2bit code.

GlobalMincut 
The GlobalMincut class represents a data type for computing a
global minimum cut in a graph with nonnegative edge weights.

GrahamScan 
The GrahamScan data type provides methods for computing the
convex hull of a set of n points in the plane.

Graph 
The Graph class represents an undirected graph of vertices
named 0 through V – 1.

GraphGenerator 
The GraphGenerator class provides static methods for creating
various graphs, including ErdosRenyi random graphs, random bipartite
graphs, random kregular graphs, and random rooted trees.

GrayscalePicture 
This class provides methods for manipulating individual pixels of
a grayscale image.

GREP 
The GREP class provides a client for reading in a sequence of
lines from standard input and printing to standard output those lines
that contain a substring matching a specified regular expression.

Heap 
The Heap class provides a static method to sort an array
using heapsort.

HexDump 
The HexDump class provides a client for displaying the contents
of a binary file in hexadecimal.

HopcroftKarp 
The HopcroftKarp class represents a data type for computing a
maximum (cardinality) matching and a
minimum (cardinality) vertex cover in a bipartite graph.

Huffman 
The Huffman class provides static methods for compressing
and expanding a binary input using Huffman codes over the 8bit extended
ASCII alphabet.

In 
Input.

IndexBinomialMinPQ<Key> 
The IndexBinomialMinPQ class represents an indexed priority queue of generic keys.

IndexFibonacciMinPQ<Key> 

IndexMaxPQ<Key extends Comparable<Key>> 
The IndexMaxPQ class represents an indexed priority queue of generic keys.

IndexMinPQ<Key extends Comparable<Key>> 
The IndexMinPQ class represents an indexed priority queue of generic keys.

IndexMultiwayMinPQ<Key> 
The IndexMultiwayMinPQ class represents an indexed priority queue of generic keys.

InplaceMSD 
The InplaceMSD class provides static methods for sorting an
array of extended ASCII strings using inplace MSD radix sort.

Insertion 
The Insertion class provides static methods for sorting an
array using insertion sort.

InsertionX 
The InsertionX class provides static methods for sorting
an array using an optimized version of insertion sort (with half exchanges
and a sentinel).

Interval1D 
The Interval1D class represents a onedimensional interval.

Interval2D 
The Interval2D class represents a closed twodimensional interval,
which represents all points (x, y) with both xmin <= x <= xmax and
ymin <= y <= ymax .

Inversions 
The Inversions class provides static methods to count the
number of inversions in either an array of integers or comparables.

KMP 
The KMP class finds the first occurrence of a pattern string
in a text string.

Knuth 
The Knuth class provides a client for reading in a
sequence of strings and shuffling them using the Knuth (or FisherYates)
shuffling algorithm.

KosarajuSharirSCC 
The KosarajuSharirSCC class represents a data type for
determining the strong components in a digraph.

KruskalMST 
The KruskalMST class represents a data type for computing a
minimum spanning tree in an edgeweighted graph.

KWIK 
The KWIK class provides a SuffixArray client for computing
all occurrences of a keyword in a given string, with surrounding context.

LazyPrimMST 
The LazyPrimMST class represents a data type for computing a
minimum spanning tree in an edgeweighted graph.

LinearProbingHashST<Key,Value> 
The LinearProbingHashST class represents a symbol table of generic
keyvalue pairs.

LinearProgramming 
The LinearProgramming class represents a data type for solving a
linear program of the form { max cx : Ax ≤ b, x ≥ 0 }, where A is an
mbyn matrix, b is an mlength vector, and c is an nlength vector.

LinearRegression 
The LinearRegression class performs a simple linear regression
on an set of n data points (y_{i}, x_{i}).

LinkedBag<Item> 
The LinkedBag class represents a bag (or multiset) of
generic items.

LinkedQueue<Item> 
The LinkedQueue class represents a firstinfirstout (FIFO)
queue of generic items.

LinkedStack<Item> 
The LinkedStack class represents a lastinfirstout (LIFO) stack of
generic items.

LongestCommonSubstring 
The LongestCommonSubstring class provides a SuffixArray
client for computing the longest common substring that appears in two
given strings.

LongestRepeatedSubstring 
The LongestRepeatedSubstring class provides a SuffixArray
client for computing the longest repeated substring of a string that
appears at least twice.

LookupCSV 
The LookupCSV class provides a datadriven client for reading in a
keyvalue pairs from a file; then, printing the values corresponding to the
keys found on standard input.

LookupIndex 
The LookupIndex class provides a datadriven client for reading in a
keyvalue pairs from a file; then, printing the values corresponding to the
keys found on standard input.

LSD 
The LSD class provides static methods for sorting an
array of wcharacter strings or 32bit integers using LSD radix sort.

LZW 
The LZW class provides static methods for compressing
and expanding a binary input using LZW compression over the 8bit extended
ASCII alphabet with 12bit codewords.

MaxPQ<Key> 
The MaxPQ class represents a priority queue of generic keys.

Merge 
The Merge class provides static methods for sorting an
array using a topdown, recursive version of mergesort.

MergeBU 
The MergeBU class provides static methods for sorting an
array using bottomup mergesort.

MergeX 
The MergeX class provides static methods for sorting an
array using an optimized version of mergesort.

MinPQ<Key> 
The MinPQ class represents a priority queue of generic keys.

MSD 
The MSD class provides static methods for sorting an
array of extended ASCII strings or integers using MSD radix sort.

Multiway 
The Multiway class provides a client for reading in several
sorted text files and merging them together into a single sorted
text stream.

MultiwayMinPQ<Key> 
The MultiwayMinPQ class represents a priority queue of generic keys.

NFA 
The NFA class provides a data type for creating a
nondeterministic finite state automaton (NFA) from a regular
expression and testing whether a given string is matched by that regular
expression.

NonrecursiveDFS 
The NonrecursiveDFS class represents a data type for finding
the vertices connected to a source vertex s in the undirected
graph.

NonrecursiveDirectedDFS 
The NonrecursiveDirectedDFS class represents a data type for finding
the vertices reachable from a source vertex s in the digraph.

Out 
This class provides methods for writing strings and numbers to
various output streams, including standard output, file, and sockets.

Particle 
The Particle class represents a particle moving in the unit box,
with a given position, velocity, radius, and mass.

PatriciaSET 
The PatriciaSET class provides an implementation of an
unordered set, with the restriction that the items (keys) are of class
String .

PatriciaST<Value> 
The PatriciaST class provides an implementation of an unordered
symbol table of keyvalue pairs, with the restriction that the key is of
class String .

Picture 
Overview.
The Picture class provides a basic capability for manipulating
the individual pixels of an image.

PictureDump 
The PictureDump class provides a client for displaying the contents
of a binary file as a blackandwhite picture.

Point2D 
The Point class is an immutable data type to encapsulate a
twodimensional point with realvalue coordinates.

Polynomial 
The Polynomial class represents a polynomial with integer
coefficients.

PrimMST 
The PrimMST class represents a data type for computing a
minimum spanning tree in an edgeweighted graph.

Queue<Item> 
The Queue class represents a firstinfirstout (FIFO)
queue of generic items.

Quick 
The Quick class provides static methods for sorting an
array and selecting the ith smallest element in an array using quicksort.

Quick3string 
The Quick3string class provides static methods for sorting an
array of strings using 3way radix quicksort.

Quick3way 
The Quick3way class provides static methods for sorting an
array using quicksort with 3way partitioning.

QuickBentleyMcIlroy 
The QuickBentleyMcIlroy class provides static methods for sorting
an array using an optimized version of quicksort (using BentleyMcIlroy
3way partitioning, Tukey's ninther, and cutoff to insertion sort).

QuickFindUF 
The QuickFindUF class represents a union–find data type
(also known as the disjointsets data type).

QuickUnionUF 
The QuickUnionUF class represents a union–find data type
(also known as the disjointsets data type).

QuickX 
The QuickX class provides static methods for sorting an array
using an optimized version of quicksort (using Hoare's 2way partitioning
algorithm, medianof3 to choose the partitioning element, and cutoff
to insertion sort).

RabinKarp 
The RabinKarp class finds the first occurrence of a pattern string
in a text string.

RandomSeq 
The RandomSeq class is a client that prints out a pseudorandom
sequence of real numbers in a given range.

RectHV 
The RectHV class is an immutable data type to encapsulate a
twodimensional axisaligned rectagle with realvalue coordinates.

RedBlackBST<Key extends Comparable<Key>,Value> 
The BST class represents an ordered symbol table of generic
keyvalue pairs.

ResizingArrayBag<Item> 
The ResizingArrayBag class represents a bag (or multiset) of
generic items.

ResizingArrayQueue<Item> 
The ResizingArrayQueue class represents a firstinfirstout (FIFO)
queue of generic items.

ResizingArrayStack<Item> 
The ResizingArrayStack class represents a lastinfirstout (LIFO) stack
of generic items.

RunLength 
The RunLength class provides static methods for compressing
and expanding a binary input using runlength coding with 8bit
run lengths.

SegmentTree 
The SegmentTree class is an structure for efficient search of cummulative data.

Selection 
The Selection class provides static methods for sorting an
array using selection sort.

SeparateChainingHashST<Key,Value> 
The SeparateChainingHashST class represents a symbol table of generic
keyvalue pairs.

SequentialSearchST<Key,Value> 
The SequentialSearchST class represents an (unordered)
symbol table of generic keyvalue pairs.

SET<Key extends Comparable<Key>> 
The SET class represents an ordered set of comparable keys.

Shell 

SparseVector 
The SparseVector class represents a ddimensional mathematical vector.

ST<Key extends Comparable<Key>,Value> 
The ST class represents an ordered symbol table of generic
keyvalue pairs.

Stack<Item> 
The Stack class represents a lastinfirstout (LIFO) stack of generic items.

StaticSETofInts 
The StaticSETofInts class represents a set of integers.

StdArrayIO 
Standard array IO.

StdAudio 
Overview.
The StdAudio class provides a basic capability for
playing, reading, and saving audio.

StdDraw 
Overview.
The StdDraw class provides a basic capability for
creating drawings with your programs.

StdIn 
Overview.
The StdIn class provides static methods for reading strings
and numbers from standard input.

StdOut 
Overview.
The StdOut class provides methods for printing strings and numbers
to standard output.

StdPicture 
Overview.
The StdPicture class provides a basic capability for manipulating
the individual pixels of an image using the RGB color model.

StdRandom 
Overview.
The StdRandom class provides static methods for generating
random number from various discrete and continuous distributions,
including uniform, Bernoulli, geometric, Gaussian, exponential, Pareto,
Poisson, and Cauchy.

StdStats 
Overview.
The StdStats class provides static methods for computing
statistics such as min, max, mean, sample standard deviation, and
sample variance.

Stopwatch 
The Stopwatch data type is for measuring
the time that elapses between the start and end of a
programming task (wallclock time).

StopwatchCPU 
The StopwatchCPU data type is for measuring
the CPU time used during a programming task.

SuffixArray 
The SuffixArray class represents a suffix array of a string of
length n.

SuffixArrayX 
The SuffixArrayX class represents a suffix array of a string of
length n.

SymbolDigraph 
The SymbolDigraph class represents a digraph, where the
vertex names are arbitrary strings.

SymbolGraph 
The SymbolGraph class represents an undirected graph, where the
vertex names are arbitrary strings.

TarjanSCC 
The TarjanSCC class represents a data type for
determining the strong components in a digraph.

ThreeSum 
The ThreeSum class provides static methods for counting
and printing the number of triples in an array of integers that sum to 0
(ignoring integer overflow).

ThreeSumFast 
The ThreeSumFast class provides static methods for counting
and printing the number of triples in an array of distinct integers that
sum to 0 (ignoring integer overflow).

TopM 
The TopM class provides a client that reads a sequence of
transactions from standard input and prints the m largest ones
to standard output.

Topological 
The Topological class represents a data type for
determining a topological order of a directed acyclic graph (DAG).

TopologicalX 
The TopologicalX class represents a data type for
determining a topological order of a directed acyclic graph (DAG).

Transaction 
The Transaction class is an immutable data type to encapsulate a
commercial transaction with a customer name, date, and amount.

Transaction.HowMuchOrder 
Compares two transactions by amount.

Transaction.WhenOrder 
Compares two transactions by date.

Transaction.WhoOrder 
Compares two transactions by customer name.

TransitiveClosure 
The TransitiveClosure class represents a data type for
computing the transitive closure of a digraph.

TrieSET 
The TrieSET class represents an ordered set of strings over
the extended ASCII alphabet.

TrieST<Value> 
The TrieST class represents a symbol table of keyvalue
pairs, with string keys and generic values.

TST<Value> 
The TST class represents a symbol table of keyvalue
pairs, with string keys and generic values.

TwoPersonZeroSumGame 
The TwoPersonZeroSumGame class represents a data type for
computing optimal row and column strategies to twoperson zerosum games.

UF 
The UF class represents a union–find data type
(also known as the disjointsets data type).

Vector 
The Vector class represents a ddimensional Euclidean vector.

WeightedQuickUnionUF 
The WeightedQuickUnionUF class represents a union–find data type
(also known as the disjointsets data type).
