Algorithms in a Nutshell

Front Cover
"O'Reilly Media, Inc.", Oct 14, 2008 - Computers - 364 pages

Creating robust software requires the use of efficient algorithms, but programmers seldom think about them until a problem occurs. Algorithms in a Nutshell describes a large number of existing algorithms for solving a variety of problems, and helps you select and implement the right algorithm for your needs -- with just enough math to let you understand and analyze algorithm performance.

With its focus on application, rather than theory, this book provides efficient code solutions in several programming languages that you can easily adapt to a specific project. Each major algorithm is presented in the style of a design pattern that includes information to help you understand why and when the algorithm is appropriate.

With this book, you will:

  • Solve a particular coding problem or improve on the performance of an existing solution
  • Quickly locate algorithms that relate to the problems you want to solve, and determine why a particular algorithm is the right one to use
  • Get algorithmic solutions in C, C++, Java, and Ruby with implementation tips
  • Learn the expected performance of an algorithm, and the conditions it needs to perform at its best
  • Discover the impact that similar design decisions have on different algorithms
  • Learn advanced data structures to improve the efficiency of algorithms

With Algorithms in a Nutshell, you'll learn how to improve the performance of key algorithms essential for the success of your software applications.

 

Contents

Algorithms Matter
3
The Mathematics of Algorithms
12
Patterns and Domains
39
II
55
Sorting Algorithms
57
Searching
105
Graph Algorithms
136
Path Finding in AI
172
Network Flow Algorithms
226
Computational Geometry
251
III
299
When All Else Fails
301
Epilogue
314
IV
321
Benchmarking
323
Index
337

Common terms and phrases