Preface
1 Analyzing Algorithms and Problems: Principles and Examples
1.1 Introduction
1.2 Java as an Algorithm Language
1.3 Mathematical Background
1.4 Analyzing Algorithms and Problems
1.5 Classifying Functions by Their Asymptotic Growth Rates
1.6 Searching an Ordered Array
Exercises
Notes and References
2 Data Abstraction and Basic Data Structures
2.1 Introduction
2.2 ADT Specification and Design Techniques
2.3 Elementary ADTs--Lists and Trees
2.4 Stacks and Queues
2.5 ADTs for Dynamic Sets
Exercises
Notes and References
3 Recursion and induction
3.1 introduction
3.2 Recursive Procedures
3.3 What is a Proof?
3.4 Induction Proofs
3.5 Proving Correctness of Procedures
3.6 Recurrence Equations
3.7 Recursion Trees
Exercises
Notes and References
4 Sorting
4.1 Introduction
4.2 Insertion Sort
4.3 Divide and Conquer
4.4 Quicksort
4.5 Merging Sorted Sequences
4.6 Mergesort
4.7 Lower Bounds for Sorting by Comparison of Keys
4.8 Heapsort
4.9 Comparison of Four Sorting Algorithms
4.10 Shellsort
4.11 Radix Sorting
Exercises
Programs
Notes and References
5 Selection and Adversary Arguments
5.1 Introduction
5.2 Finding max and min
5.3 Finding the Second-Largest Key
5.4 The Selection Problem
5.5 A Lower Bound for Finding the Median
5.6 Designing Against an Adversary
Exercises
Notes and References
6 Dynamic Sets and Searching
6.1 Introduction
6.2 Array Doubling
6.3 Amortized Time Analysis
6.4 Red-Black Trees
6.5 Hashing
6.6 Dynamic Equivalence Relations and Union-Find Programs
6.7 Priority Queues with a Decrease Key Operation
Exercises
Programs
Notes and References
7 Graphs and Graph Traversals
8 Graph Optimization Problems and Greedy Algorithms
9 Transitive Closure, All-Pairs Shortest Paths
10 Dynamic Programming
11 String Matching
12 Polynomials and Matrices
13 NP-Complete Problems
14 Parallel Algorithms
A Java Examples and Techniques
Bibliography
Index