Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching, Third Edition

Book description

“This is an eminently readable book which an ordinary programmer, unskilled in mathematical analysis and wary of theoretical algorithms, ought to be able to pick up and get a lot out of..”

— Steve Summit, author of C Programming FAQs

Sedgewick has a real gift for explaining concepts in a way that makes them easy to understand. The use of real programs in page-size (or less) chunks that can be easily understood is a real plus. The figures, programs, and tables are a significant contribution to the learning experience of the reader; they make this book distinctive.

— William A. Ward, University of South Alabama

Robert Sedgewick has thoroughly rewritten and substantially expanded his popular work to provide current and comprehensive coverage of important algorithms and data structures. Many new algorithms are presented, and the explanations of each algorithm are much more detailed than in previous editions. A new text design and detailed, innovative figures, with accompanying commentary, greatly enhance the presentation. The third edition retains the successful blend of theory and practice that has made Sedgewick’s work an invaluable resource for more than 250,000 programmers!

This particular book, Parts 1-4, represents the essential first half of Sedgewick’s complete work. It provides extensive coverage of fundamental data structures and algorithms for sorting, searching, and related applications. The algorithms and data structures are expressed in concise implementations in C, so that you can both appreciate their fundamental properties and test them on real applications. Of course, the substance of the book applies to programming in any language.

Highlights

  • Expanded coverage of arrays, linked lists, strings, trees, and other basic data structures

  • Greater emphasis on abstract data types (ADTs) than in previous editions

  • Over 100 algorithms for sorting, selection, priority queue ADT implementations, and symbol table ADT (searching) implementations

  • New implementations of binomial queues, multiway radix sorting, Batcher’s sorting networks, randomized BSTs, splay trees, skip lists, multiway tries, and much more

  • Increased quantitative information about the algorithms, including extensive empirical studies and basic analytic studies, giving you a basis for comparing them

  • Over 1000 new exercises to help you learn the properties of algorithms

Whether you are a student learning the algorithms for the first time or a professional interested in having up-to-date reference material, you will find a wealth of useful information in this book.

Table of contents

  1. About This eBook
  2. Title Page
  3. Copyright Page
  4. Preface
    1. Scope
    2. Use in the Curriculum
    3. Algorithms of Practical Use
    4. Programming Language
    5. Acknowledgments
  5. Dedication Page
  6. Notes on Exercises
  7. Contents
  8. Part One: Fundamentals
    1. Chapter One. Introduction
      1. 1.1 Algorithms
      2. 1.2 A Sample Problem: Connectivity
      3. Exercises
      4. 1.3 Union–Find Algorithms
      5. Exercises
      6. 1.4 Perspective
      7. Exercises
      8. 1.5 Summary of Topics
    2. Chapter Two. Principles of Algorithm Analysis
      1. 2.1 Implementation and Empirical Analysis
      2. Exercises
      3. 2.2 Analysis of Algorithms
      4. Exercises
      5. 2.3 Growth of Functions
      6. Exercises
      7. 2.4 Big-Oh Notation
      8. Exercises
      9. 2.5 Basic Recurrences
      10. Exercises
      11. 2.6 Examples of Algorithm Analysis
      12. Exercises
      13. 2.7 Guarantees, Predictions, and Limitations
      14. Exercise
    3. References for Part One
  9. Part Two: Data Structures
    1. Chapter Three. Elementary Data Structures
      1. 3.1 Building Blocks
      2. Exercises
      3. 3.2 Arrays
      4. Exercises
      5. 3.3 Linked Lists
      6. Exercises
      7. 3.4 Elementary List Processing
      8. Exercises
      9. 3.5 Memory Allocation for Lists
      10. Exercises
      11. 3.6 Strings
      12. Exercises
      13. 3.7 Compound Data Structures
      14. Exercises
    2. Chapter Four. Abstract Data Types
      1. 4.1 Abstract Objects and Collections of Objects
      2. Exercises
      3. 4.2 Pushdown Stack ADT
      4. Exercises
      5. 4.3 Examples of Stack ADT Clients
      6. Exercises
      7. 4.4 Stack ADT Implementations
      8. Exercises
      9. 4.5 Creation of a New ADT
      10. Exercises
      11. 4.6 FIFO Queues and Generalized Queues
      12. Exercises
      13. 4.7 Duplicate and Index Items
      14. Exercises
      15. 4.8 First-Class ADTs
      16. Exercises
      17. 4.9 Application-Based ADT Example
      18. Exercises
      19. 4.10 Perspective
    3. Chapter Five. Recursion and Trees
      1. 5.1 Recursive Algorithms
      2. Exercises
      3. 5.2 Divide and Conquer
      4. Exercises
      5. 5.3 Dynamic Programming
      6. Exercises
      7. 5.4 Trees
      8. Exercises
      9. 5.5 Mathematical Properties of Binary Trees
      10. Exercises
      11. 5.6 Tree Traversal
      12. Exercises
      13. 5.7 Recursive Binary-Tree Algorithms
      14. Exercises
      15. 5.8 Graph Traversal
      16. Exercises
      17. 5.9 Perspective
    4. References for Part Two
  10. Part Three: Sorting
    1. Chapter Six. Elementary Sorting Methods
      1. 6.1 Rules of the Game
      2. Exercises
      3. 6.2 Selection Sort
      4. Exercises
      5. 6.3 Insertion Sort
      6. Exercises
      7. 6.4 Bubble Sort
      8. Exercises
      9. 6.5 Performance Characteristics of Elementary Sorts
      10. Exercises
      11. 6.6 Shellsort
      12. Exercises
      13. 6.7 Sorting of Other Types of Data
      14. Exercises
      15. 6.8 Index and Pointer Sorting
      16. Exercises
      17. 6.9 Sorting of Linked Lists
      18. Exercises
      19. 6.10 Key-Indexed Counting
      20. Exercises
    2. Chapter Seven. Quicksort
      1. 7.1 The Basic Algorithm
      2. Exercises
      3. 7.2 Performance Characteristics of Quicksort
      4. Exercises
      5. 7.3 Stack Size
      6. Exercises
      7. 7.4 Small Subfiles
      8. Exercises
      9. 7.5 Median-of-Three Partitioning
      10. Exercises
      11. 7.6 Duplicate Keys
      12. Exercises
      13. 7.7 Strings and Vectors
      14. Exercises
      15. 7.8 Selection
      16. Exercises
    3. Chapter Eight. Merging and Mergesort
      1. 8.1 Two-Way Merging
      2. Exercises
      3. 8.2 Abstract In-place Merge
      4. Exercises
      5. 8.3 Top-Down Mergesort
      6. Exercises
      7. 8.4 Improvements to the Basic Algorithm
      8. Exercises
      9. 8.5 Bottom-Up Mergesort
      10. Exercises
      11. 8.6 Performance Characteristics of Mergesort
      12. Exercises
      13. 8.7 Linked-List Implementations of Mergesort
      14. Exercises
      15. 8.8 Recursion Revisited
      16. Exercises
    4. Chapter Nine. Priority Queues and Heapsort
      1. Exercises
      2. 9.1 Elementary Implementations
      3. Exercises
      4. 9.2 Heap Data Structure
      5. Exercises
      6. 9.3 Algorithms on Heaps
      7. Exercises
      8. 9.4 Heapsort
      9. Exercises
      10. 9.5 Priority-Queue ADT
      11. Exercises
      12. 9.6 Priority Queues for Index Items
      13. Exercises
      14. 9.7 Binomial Queues
      15. Exercises
    5. Chapter Ten. Radix Sorting
      1. 10.1 Bits, Bytes, and Words
      2. Exercises
      3. 10.2 Binary Quicksort
      4. Exercises
      5. 10.3 MSD Radix Sort
      6. Exercises
      7. 10.4 Three-Way Radix Quicksort
      8. Exercises
      9. 10.5 LSD Radix Sort
      10. Exercises
      11. 10.6 Performance Characteristics of Radix Sorts
      12. Exercises
      13. 10.7 Sublinear-Time Sorts
      14. Exercises
    6. Chapter Eleven. Special-Purpose Sorting Methods
      1. 11.1 Batcher’s Odd–Even Mergesort
      2. Exercises
      3. 11.2 Sorting Networks
      4. Exercises
      5. 11.3 External Sorting
      6. Exercises
      7. 11.4 Sort–Merge Implementations
      8. Exercises
      9. 11.5 Parallel Sort–Merge
      10. Exercises
    7. References for Part Three
  11. Part Four: Searching
    1. Chapter Twelve. Symbol Tables and Binary Search Trees
      1. 12.1 Symbol-Table Abstract Data Type
      2. Exercises
      3. 12.2 Key-Indexed Search
      4. Exercises
      5. 12.3 Sequential Search
      6. Exercises
      7. 12.4 Binary Search
      8. Exercises
      9. 12.5 Binary Search Trees (BSTs)
      10. Exercises
      11. 12.6 Performance Characteristics of BSTs
      12. Exercises
      13. 12.7 Index Implementations with Symbol Tables
      14. Exercises
      15. 12.8 Insertion at the Root in BSTs
      16. Exercises
      17. 12.9 BST Implementations of Other ADT Functions
      18. Exercises
    2. Chapter Thirteen. Balanced Trees
      1. Exercises
      2. 13.1 Randomized BSTs
      3. Exercises
      4. 13.2 Splay BSTs
      5. Exercises
      6. 13.3 Top-Down 2-3-4 Trees
      7. Exercises
      8. 13.4 Red–Black Trees
      9. Exercises
      10. 13.5 Skip Lists
      11. Exercises
      12. 13.6 Performance Characteristics
      13. Exercises
    3. Chapter Fourteen. Hashing
      1. 14.1 Hash Functions
      2. Exercises
      3. 14.2 Separate Chaining
      4. Exercises
      5. 14.3 Linear Probing
      6. Exercises
      7. 14.4 Double Hashing
      8. Exercises
      9. 14.5 Dynamic Hash Tables
      10. Exercises
      11. 14.6 Perspective
      12. Exercises
    4. Chapter Fifteen. Radix Search
      1. 15.1 Digital Search Trees
      2. Exercises
      3. 15.2 Tries
      4. Exercises
      5. 15.3 Patricia Tries
      6. Exercises
      7. 15.4 Multiway Tries and TSTs
      8. Exercises
      9. 15.5 Text-String–Index Algorithms
      10. Exercises
    5. Chapter Sixteen. External Searching
      1. 16.1 Rules of the Game
      2. 16.2 Indexed Sequential Access
      3. Exercises
      4. 16.3 B Trees
      5. Exercises
      6. 16.4 Extendible Hashing
      7. Exercises
      8. 16.5 Perspective
      9. Exercises
  12. References for Part Four
  13. Index
  14. Code Snippets

Product information

  • Title: Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching, Third Edition
  • Author(s): Robert Sedgewick
  • Release date: August 1997
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780768685312