"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.
Sedgewick's bestselling book, Algorithms, is now available for C programmers. Algorithms in C describes a variety of algorithms in a number of areas of interest, including: sorting, searching, string-processing, and geometric, graph and mathematical algorithms. The book emphasizes fundamental techniques, providing readers with the tools to confidently implement, run, and debug useful algorithms.
I. FUNDAMENTALS. 1. Introduction.
Outline of Topics. 2. C.
Example: Euclid’s Algorithm.
Types of Data.
Concluding Remarks. 3. Elementary Data Structures.
Abstract Data Types. 4. Trees.
Representing Binary Trees.
Traversing Trees. 5. Recursion.
Recursive Tree Traversal.
Perspective. 6. Analysis of Algorithms.
Classification of Algorithms.
Approximate and Asymptotic Results.
Perspective. 7. Implementation of Algorithms.
Selecting an Algorithm.
Algorithms and Systems.
II. SORTING ALGORITHMS. 8. Elementary Sorting Methods.
Rules of the Game.
Digression: Bubble Sort.
Performance Characteristics of Elementary Sorts.
Sorting Files with Large Records.
Distribution Counting. 9. Quicksort.
The Basic Algorithm.
Performance Characteristics of Quicksort.
Selection. 10. Radix Sorting.
Radix Exchange Sort.
Straight Radix Sort.
Performance Characteristics of Radix Sorts.
A Linear Sort. 11. Priority Queues.
Heap Data Structure.
Algorithms on Heaps.
Advanced Implementations. 12. Mergesort.
Recursion Revisited. 13. External Sorting.
Balanced Multiway Merging.
An Easier Way.
III. SEARCHING ALGORITHMS. 14. Elementary Searching Methods.
Binary Tree Search.
Indirect Binary Search Trees. 15. Balanced Trees.
Top-Down 2-3-4 Trees.
Other Algorithms. 16. Hashing.
Perspective. 17. Radix Searching.
Digital Search Trees.
Radix Search Tries.
Multiway Radix Searching.
Patricia. 18. External Searching.
Indexed Sequential Access.
IV. STRING PROCESSING. 19. String Searching.
A Short History.
Multiple Searches. 20. Pattern Matching.
Pattern Matching Machines.
Representing the Machine.
Simulating the Machine. 21. Parsing.
Compiler-Compilers. 22. File Compression.
Building the Huffman Code.
Implementation. 23. Cryptology.
Rules of Game.
V. GEOMETRIC ALGORITHMS. 24. Elementary Geometric Methods.
Points, Lines, and Polygons.
Line Segment Intersection.
Simple Closed Path.
Inclusion in a Polygon.
Perspective. 25. Finding the Convex Hull.
Rules of the Game.
The Graham Scan.
Performance Issues. 26. Range Searching.
Multidimensional Range Searching. 27. Geometric Intersection.
Horizontal and Vertical Lines.
General Line Intersection 28. Closest-Point Problems.
VI. GRAPH ALGORITHMS. 29. Elementary Graph Algorithms.
Nonrecursive Depth-First Search.
Perspective. 30. Connectivity.
Union-Find Algorithms. 31. Weighted Graphs
Minimum Spanning Tree.
Minimum Spanning Tree and Shortest Paths in Dense Graphs.
Geometric Problems. 32. Network Flow.
The Network Flow Problem.
Network Searching. 33. Matching.
Stable Marriage Problem.
VII. MATHEMATICAL ALGORITHMS. 34. Random Numbers.
Linear Congruential Method.
Additive Congruential Method.
Implementation Notes. 35. Arithmetic.
Polynomial Evaluation and Interpolation.
Arithmetic Operations with Large Integers.
Matrix Arithmetic. 36. Gaussian Elimination.
A Simple Example.
Outline of the Method.
Variations and Extensions. 37. Curve Fitting.
Method of Least Squares. 38. Integration.
Simple Quadrature Methods.
VIII. ADVANCED TOPICS 39. Parallel Algorithms.
Perspective. 40. The Fast Fourier Transform.
Evaluate, Multiply, Interpolate.
Complex Roots of Unity.
Evaluation of the Roots of Unity.
Interpolation at the Roots of Unity.
Implementation. 41. Dynamic Programming.
Matrix Chain Product.
Optimal Binary Search Trees.
Time and Space Requirements. 42. Linear Programming.
The Simplex Method.
Implementation. 43. Exhaustive Search.
Exhaustive Search in Graphs.
Digression: Permutation Generation.
Approximation Algorithms. 44. NP-Complete Problems.
Deterministic and Nondeterministic Polynomial-Time
Some NP-Complete Problems. 0201514257T04062001