Algorithms in a Nutshell

(Tina Meador) #1
ix

Chapter 2

Preface........................................................................................................


As Trinity states in the movieThe Matrix:
It’s the question that drives us, Neo. It’s the question that brought you here.
You know the question, just as I did.
As authors of this book, we answer the question that has led you here:
Can I use algorithmX to solve my problem? If so, how do I implement it?
You likely do not need to understand the reasons why an algorithm is correct—if
you do, turn to other sources, such as the 1,180-page bible on algorithms,Intro-
duction to Algorithms,Second Edition, by Thomas H. Cormen et al. (2001). There
you will find lemmas, theorems, and proofs; you will find exercises and step-by-step
examples showing the algorithms as they perform. Perhaps surprisingly, however,
you will not find any real code, only fragments of “pseudocode,” the device used by
countless educational textbooks to present a high-level description of algorithms.
These educational textbooks are important within the classroom, yet they fail the
software practitioner because they assume it will be straightforward to develop real
code from pseudocode fragments.
We intend this book to be used frequently by experienced programmers looking
for appropriate solutions to their problems. Here you will find solutions to the
problems you must overcome as a programmer every day. You will learn what
decisions lead to an improved performance of key algorithms that are essential for
the success of your software applications. You will find real code that can be
adapted to your needs and solution methods that you can learn.
All algorithms are fully implemented with test suites that validate the correct
implementation of the algorithms. The code is fully documented and available as
a code repository addendum to this book. We rigorously followed a set of princi-
ples as we designed, implemented, and wrote this book. If these principles are
meaningful to you, then you will find this book useful.

Algorithms in a Nutshell
Algorithms in a Nutshell By Gary Pollice, George T. Heineman, Stanley Selkow ISBN:
9780596516246 Publisher: O'Reilly Media, Inc.


Prepared for Ming Yi, Safari ID: [email protected]
Licensed by Ming Yi
Print Publication Date: 2008/10/21 User number: 594243
© 2009 Safari Books Online, LLC. This PDF is made available for personal use only during the relevant subscription term, subject to the Safari Terms of Service. Any other use

Free download pdf