0% found this document useful (0 votes)
239 views

Programming Pearls

This document is the table of contents for the book "Programming Pearls" by Jon Bentley. The book is divided into three parts: Preliminaries, Performance, and The Product. Part I covers topics like problem solving techniques, data structures, writing correct programs, and debugging. Part II focuses on performance, including algorithm design, code tuning, and squeezing space. Part III discusses specific data structures and algorithms like sorting, searching, heaps, and strings. The book contains 15 columns that each cover a different programming topic, along with appendices on algorithms, estimation, cost models, and C++ classes for searching.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
239 views

Programming Pearls

This document is the table of contents for the book "Programming Pearls" by Jon Bentley. The book is divided into three parts: Preliminaries, Performance, and The Product. Part I covers topics like problem solving techniques, data structures, writing correct programs, and debugging. Part II focuses on performance, including algorithm design, code tuning, and squeezing space. Part III discusses specific data structures and algorithms like sorting, searching, heaps, and strings. The book contains 15 columns that each cover a different programming topic, along with appendices on algorithms, estimation, cost models, and C++ classes for searching.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Programming

Pearls
Second Edition
JON BENTLEY
Bell Labs, Lucent Technologies
Murray Hill, New Jersey

ACM Press
New York, New York

v:Addison-Wesley
Boston San Francisco New York Toronto Montreal
London Munich Paris Madrid
Capetown Sydney Tokyo Singapore Mexico City

CONTENTS

Part I: PRELIMINARIES

Column 1: Cracking the Oyster


A Friendly Conversation Precise Problem Statement . Program Design
Implementation Sketch . Principles Problems . Further Reading

Column 2: Aha! Algorithms


Three Problems . Ubiquitous Binary Search . The Power of Primitives
Getting It Together: Sorting . Principles Problems Further Reading .
Implementing an Anagram Program

11

Column 3: Data Structures Programs


A Survey Program Form-Letter Programming . An Array of Examples .
Structuring Data . Powerful Tools for Specialized Data . Principles Problems . Further Reading

21

Column 4: Writing Correct Programs


The Challenge of Binary Search . Writing the Program Understanding the
Program . Principles . The Roles of Program Verification . Problems
Further Reading

33

Column 5: A Small Matter of Programming


From Pseudocode to C . A Test Harness The Art of Assertion . Automated Testing . Timing The Complete Program . Principles . Problems
. Further Reading Debugging

45

59

Part II: PERFORMANCE

Column 6: Perspective an Performance


A Case Study . Design Levels Principles Problems Further Reading

61

Column 7: The Back of the Envelope


Basic Skills Performance Estimates Safety Factors . Little's Law .
Principles . Problems Further Reading Quick Calculations in Everyday
Life

67

ix

X PROGRAMMING PEARLS

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? . Principles Problems . Further Reading

77

Column 9 Code Tuning


A Typical Story . A First Aid Sampler Major Surgery Binary Search .
Principles . Problems . Further Reading

87

Column 10: Squeezing Space


The Key Simplicity . An Illustrative Problem . Techniques for Data
Space Techniques for Code Space Principles . Problems . Further
Reading . A Big Squeeze

99

Part III: THE PRODUCT

113

Column 11: Sorting


Insertion Sort A Simple Quicksort . Better Quicksorts Principles .
Problems . Further Reading

115

Column 12: A Sample Problem


The Problem . One Solution The Design Space Principles Problems
Further Reading

125

Column 13: Searching


The Interface Linear Structures . Binary Search Trees Structures for
Integers . Principles . Problems . Further Reading . A Real Searching
Problem

133

Column 14: Heaps


The Data Structure . Two Critical Functions . Priority Queues . A Sorting
Algorithm Principles . Problems Further Reading

147

Column 15: Strings of Pearls


Words Phrases Generating Text . Principles Problems Further
Reading

161

Epilog to the First Edition

175

Epilog to the Second Edition

177

Appendix 1: A Catalog of Algorithms

179

Appendix 2: An Estimation Quiz

183

Appendix 3: Cost Models for Time and Space

185

CONTEN TS Xi

Appendix 4: Rules for Code Tuning

191

Appendix 5: C++ Classes for Searching

197

Hints for Selected Problems

201

Solutions to Selected Problems

205

Index

233

You might also like