This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Also available in other formats.
Register your product to gain access to bonus material or receive a coupon.
When programmers list their favorite books, Jon Bentley’s collection of programming pearls is commonly included among the classics. Just as natural pearls grow from grains of sand that irritate oysters, programming pearls have grown from real problems that have irritated real programmers. With origins beyond solid engineering, in the realm of insight and creativity, Bentley’s pearls offer unique and clever solutions to those nagging problems. Illustrated by programs designed as much for fun as for instruction, the book is filled with lucid and witty descriptions of practical programming techniques and fundamental design principles. It is not at all surprising that Programming Pearls has been so highly valued by programmers at every level of experience.
In this revision, the first in 14 years, Bentley has substantially updated his essays to reflect current programming methods and environments. In addition, there are three new essays on
All the original programs have been rewritten, and an equal amount of new code has been generated. Implementations of all the programs, in C or C++, are now available on the Web.
What remains the same in this new edition is Bentley’s focus on the hard core of programming problems and his delivery of workable solutions to those problems. Whether you are new to Bentley’s classic or are revisiting his work for some fresh insight, the book is sure to make your own list of favorites.
I. PRELIMINARIES.Column 1. Cracking the Oyster.
A Friendly Conversation.
Precise Problem Statement.
Further Reading.Column 2. Aha! Algorithms.
Ubiquitous Binary Search.
The Power of Primitives.
Getting It Together: Sorting.
Principles · Problems.
Implementing an Anagram Program.Column 3. Data Structures Programs.
A Survey Program.
An Array of Examples.
Powerful Tools for Specialized Data.
Further Reading.Column 4. Writing Correct Programs.
The Challenge of Binary Search.
Writing the Program.
Understanding the Program.
The Roles of Program Verification.
Further Reading.Column 5. A Small Matter of Programming.
From Pseudocode to C.
A Test Harness.
The Art of Assertion.
The Complete Program.
II. PERFORMANCE.Column 6. Perspective on Performance.
A Case Study.
Further Reading.Column 7. The Back of the Envelope.
Quick Calculations in Everyday Life.Column 8. Algorithm Design Techniques.
The Problem and a Simple Algorithm.
Two Quadratic Algorithms.
A Divide-and-Conquer Algorithm.
A Scanning Algorithm.
What Does It Matter?
Further Reading.Column 9. Code Tuning.
A Typical Story.
A First Aid Sampler.
Major Surgery—Binary Search.
Further Reading.Column 10. Squeezing Space.
An Illustrative Problem.
Techniques for Data Space.
Techniques for Code Space.
A Big Squeeze.
III. THE PRODUCT.Column 11. Sorting.
A Simple Quicksort.
Further Reading.Column 12. A Sample Problem.
The Design Space.
Further Reading.Column 13. Searching.
Binary Search Trees.
Structures for Integers.
A Real Searching Problem.Column 14. Heaps.
The Data Structure.
Two Critical Functions.
A Sorting Algorithm.
Further Reading.Column 15. Strings of Pearls.
Further Reading.Epilog to the First Edition.