Published by Addison-Wesley Professional (February 21, 2011) © 2011
Robert Sedgewick | Kevin WayneThe leading introduction to computer algorithms in use today, including fifty algorithms every programmer should know
Princeton Computer Science professors, Robert Sedgewick and Kevin Wayne, survey the most important computer algorithms in use and of interest to anyone working in science, mathematics, and engineering, and those who use computation in the liberal arts. They provide a full treatment of data structures and algorithms for key areas that enable you to confidently implement, debug, and put them to work in any computational environment.
Fundamentals:
- Basic programming models
- Data abstraction
- Bags, queues, and stacks
- Analysis of algorithms
Sorting
- Elementary sorts
- Mergesort
- Quicksort
- Priority queues
- Applications
Graphs
- Undirected graphs
- Directed graphs
- Minimum spanning trees
- Shortest paths
Strings
- String sorts
- Tries
- Substring search
- Regular expressions
- Data compression
These algorithms are generally ingenious creations that, remarkably, can each be expressed in just a dozen or two lines of code. As a group, they represent problem-solving power of amazing scope. They have enabled the construction of computational artifacts, the solution of scientific problems, and the development of commercial applications that would not have been feasible without them.
Preface viii
Chapter 1: Fundamentals 3
1.1 Basic Programming Model 8
1.2 Data Abstraction 64
1.3 Bags, Queues, and Stacks 120
1.4 Analysis of Algorithms 172
1.5 Case Study: Union-Find 216
Chapter 2: Sorting 243
2.1 Elementary Sorts 244
2.2 Mergesort 270
2.3 Quicksort 288
2.4 Priority Queues 308
2.5 Applications 336
Chapter 3: Searching 361
3.1 Symbol Tables 362
3.2 Binary Search Trees 396
3.3 Balanced Search Trees 424
3.4 Hash Tables 458
3.5 Applications 486
Chapter 4: Graphs 515
4.1 Undirected Graphs 518
4.2 Directed Graphs 566
4.3 Minimum Spanning Trees 604
4.4 Shortest Paths 638
Chapter 5: Strings 695
5.1 String Sorts 702
5.2 Tries 730
5.3 Substring Search 758
5.4 Regular Expressions 788
5.5 Data Compression 810
Chapter 6: Context 853
Index 933
List of Algorithms 954
List of Clients 955