Book Review: Algorithms (Robert Sedgewick – Kevin Wayne)

Join me to stay up-to-date and get my new articles delivered to your inbox by subscribing here.

October 23, 2022

Book Review  Coding & Algorithm Interview 


To me, its content is priceless. For sure, this extraordinary book comes at a cost, you can purchase the textbook in either hardcover or electronic format. But, there is another completely FREE option. Yes, it is too good to be true but it is true. 🙂 Two free courses (Part I and Part II) were prepared by the book’s authors. Of course, there is no certification but the courses’ content is completely open to everyone at no cost. The courses offer more than 100 video lecture segments that are integrated with the text, extensive online assessments, and large-scale discussion forums that have proven so valuable.

When it comes to the book, it is the leading textbook on algorithms today and is widely used in colleges and universities worldwide. It surveys the most important computer algorithms currently in use and provides a full treatment of data structures and algorithms for sorting, searching, graph processing, and string processing.

Part I of the course focuses on elementary data structures, sorting, and searching. Topics include union−find, binary search, stacks, queues, bags, insertion sort, selection sort, shell sort, quicksort, 3-way quicksort, mergesort, heapsort, binary heaps, binary search trees, red−black trees, separate-chaining and linear-probing hash tables, Graham scan, and KD-trees.

Part II of the course focuses on graph and string-processing algorithms. Topics include depth-first search, breadth-first search, topological sort, Kosaraju−Sharir, Kruskal, Prim, Dijkstra, Bellman−Ford, Ford−Fulkerson, LSD radix sort, MSD radix sort, 3-way radix quicksort, multiway tries, ternary search tries, Knuth−Morris−Pratt, Boyer−Moore, Rabin–Karp, regular expression matching, run-length coding, Huffman coding, LZW compression and Burrows−Wheeler transform. Part II also introduces reductions and intractability, including the P = NP problem.

The algorithms in this book represent a body of knowledge developed over the last 50 years that has become indispensable, not just for professional programmers and computer science students but for any student with interests in science, mathematics, and engineering, not to mention students who use computation in the liberal arts.


Author: Robert Sedgewick

You can review the bio from Wikipedia and Princeton University.

Robert Sedgewick has been a Professor of Computer Science at Princeton University since 1985, where he was the founding Chairman of the Department of Computer Science. He has held visiting research positions at Xerox PARC, Institute for Defense Analyses, and INRIA, and is a member of the board of directors of Adobe Systems. Professor Sedgewick’s research interests include analytic combinatorics, design and analysis of data structures and algorithms, and program visualization. His landmark book, Algorithms, now in its fourth edition, has appeared in numerous versions and languages over the past thirty years.

Author: Kevin Wayne

You can review the bio from Princeton University.

Kevin Wayne is the Phillip Y. Goldman Senior Lecturer in Computer Science at Princeton University, where he has been teaching since 1998. He received a PhD in operations research and industrial engineering from Cornell University. His research interests include the design, analysis, and implementation of algorithms, especially for graphs and discrete optimization.

Breadth of coverage (from the publisher)

Sedgewick and Wayne’s primary goal is to introduce the most important algorithms in use today to as wide an audience as possible. These algorithms are generally ingenious creations that, remarkably, can each be expressed in just a dozen or two lines of code. As a group, they represent the problem-solving power of the amazing scope. They have enabled the construction of computational artifacts, the solution of scientific problems, and the development of commercial applications that would not have been feasible without them.

They cover basic abstract data types, sorting algorithms, searching algorithms, graph processing, and string processing. They keep the material in an algorithmic context, describing data structures, algorithm design paradigms, reduction, and problem-solving models. They cover classic methods that have been taught since the 1960s and new methods that have been invented in recent years.

Book Content

  • Chapter 1. Fundamentals
    • 1.1 Basic Programming Model
      • Primitive Data Types
      • Loops and Conditionals
      • Arrays
      • Static Methods
      • Recursion
      • APIs
      • Strings
      • Input and Output
      • Binary Search
    • 1.2 Data Abstraction
      • Objects
      • Abstract Data Types
      • Implementing ADTs
      • Designing ADTs
    • 1.3 Bags, Queues, and Stacks
      • APIs
      • Arithmetic Expression Evaluation
      • Resizing Arrays
      • Generics
      • Iterators
      • Linked Lists
    • 1.4 Analysis of Algorithms
      • Running Time
      • Computational Experiments
      • Tilde Notation
      • Order-of-growth Classifications
      • Amortized Analysis
      • Memory Usage
    • 1.5 Case Study: Union-Find
      • Dynamic Connectivity
      • Quick Find
      • Quick Union
      • Weighted Quick Union
  • Chapter 2. Sorting
    • 2.1 Elementary Sorts
      • Rules of The Game
      • Selection Sort
      • Insertion Sort
      • Shellsort
    • 2.2 Mergesort
      • Abstract in-place Merge
      • Top-down Mergesort
      • Bottom-up Mergesort
      • N log N Lower Bound for Sorting
    • 2.3 Quicksort
      • In-place Partitioning
      • Randomized Quicksort
      • 3-way Partitioning
    • 2.4 Priority Queues
      • Priority Queue API
      • Elementary Implementations
      • Binary Heap
      • Heapsort
    • 2.5 Applications
      • Comparators
      • Stability
      • Median and Order Statistics
  • Chapter 3. Searching
    • 3.1 Symbol Tables
      • Symbol Table API
      • Ordered Symbol Table API
      • Dedup
      • Frequency Counter
      • Sequential Search
      • Binary Search
    • 3.2 Binary Search Trees
      • Basic Implementation
      • Order-based Methods
      • Deletion
    • 3.3 Balanced Search Trees
      • 2-3 Search Trees
      • Red-Black BSTs
      • Deletion
    • 3.4 Hash Tables
      • Hash Functions
      • Separate Chaining
      • Linear Probing
    • 3.5 Applications
      • Set Data Type
      • Whitelist and Blacklist Filters
      • Dictionary Lookup
      • Inverted Index
      • File Indexing
      • Sparse Matrix-Vector Multiplication
  • Chapter 4. Graphs
    • 4.1 Undirected Graphs
      • Glossary
      • Undirected Graph Type
      • Adjacency-Lists Representation
      • Depth-First Search
      • Breadth-First Search
      • Connected Components
      • Degrees of Separation
    • 4.2 Directed Graphs
      • Glossary
      • Digraph Data Type
      • Depth-First Search
      • Directed Cycle Detection
      • Precedence-Constrained Scheduling
      • Topological Sort
      • Strong Connectivity
      • Kosaraju-Sharir Algorithm
      • Transitive Closure
    • 4.3 Minimum Spanning Trees
      • Cut Property
      • Greedy Algorithm
      • Edge-weighted Graph Data Type
      • Prim’s Algorithm
      • Kruskal’s Algorithm
    • 4.4 Shortest Paths
      • Properties of Shortest Paths
      • Edge-weighted Digraph Data Types
      • Generic Shortest Paths Algorithm
      • Dijkstra’s Algorithm
      • Shortest-Path in Edge-weighted DAGs
      • Critical-path Method
      • Bellman-Ford Algorithm
      • Negative Cycle Detection
      • Arbitrage
  • Chapter 5. Strings
    • 5.1 String Sorts
      • Key-indexed Counting
      • LSD String Sort
      • MSD String Sort
      • 3-way String Quicksort
    • 5.2 Tries
      • String Symbol Table API
      • R-way Tries
      • Ternary Search Tries
      • Character-based Operations
    • 5.3 Substring Search
      • Brute-force Algorithm
      • Knuth-Morris-Pratt Algorithm
      • Boyer-Moore Algorithm
      • Rapin-Karp Fingerprint Algorithm
    • 5.4 Regular Expressions
      • Describing Patterns with REs
      • Applications
      • Nondeterministic Finite-state Automata
      • Simulating an NFA
      • Building an NFA corresponding to an RE
    • 5.5 Data Compression
      • Rules of The Game
      • Reading and Writing Binary Data
      • Limitations
      • Run-length Coding
      • Huffman Compression
      • LZW Compression
  • Chapter 6. Context
    • 6.1 Event-Driven Simulation
      • Hard-disk Model
      • Collision Prediction
      • Collision Resolution
    • 6.2 B-Trees
      • Cost Model
      • Search and Insert
    • 6.3 Suffix Arrays
      • Suffix Sorting
      • Longest Repeated Substring
      • Keyword in Context
    • 6.4 Network Flow
      • Maximum Flow
      • Minimum Cut
      • Ford-Fulkerson Algorihtm
    • 6.5 Reductions
      • Sorting
      • Shortest Path
      • Bipartite Matching
      • Linear Programming
    • 6.6 Intractability
      • Longest-paths Problem
      • P vs NP
      • Boolean Satisfiability
      • NP-Completeness