Programming Pearls [PDF]

Programming. Pearls. Second Edition. JON BENTLEY. Bell Labs, Lucent Technologies. Murray Hill, New Jersey. ACM Press. Ne

3 downloads 5 Views 153KB Size

Recommend Stories


[PDF] Programming Pearls (2nd Edition)
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

[PDF] Programming Pearls (2nd Edition)
The only limits you see are the ones you impose on yourself. Dr. Wayne Dyer

Programming Pearls Acm Press
When you do things from your soul, you feel a river moving in you, a joy. Rumi

[PDF] Download Programming Pearls (2nd Edition)
Keep your face always toward the sunshine - and shadows will fall behind you. Walt Whitman

Read PdF Programming Pearls (2nd Edition)
If you want to become full, let yourself be empty. Lao Tzu

[PDF]Review Programming Pearls (2nd Edition)
I tried to make sense of the Four Books, until love arrived, and it all became a single syllable. Yunus

PDF Download Programming Pearls (2nd Edition)
You have to expect things of yourself before you can do them. Michael Jordan

Read Programming Pearls (2nd Edition)
Be like the sun for grace and mercy. Be like the night to cover others' faults. Be like running water

Read book Programming Pearls (2nd Edition)
Don't watch the clock, do what it does. Keep Going. Sam Levenson

Pitch 4 Pearls (PDF Download)
Silence is the language of God, all else is poor translation. Rumi

Idea Transcript


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

1

Part I: PRELIMINARIES

Column 1: Cracking the Oyster A Friendly Conversation • Precise Problem Statement . Program Design Implementation Sketch . Principles • Problems . Further Reading

3

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

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.