Chapter 0 Introduction¶
Chapter 1 Design¶
Chapter 2 Programming Tutorials¶
Chapter 3 Algorithm Analysis¶
- 3.1. Chapter Introduction
- 3.2. Problems, Algorithms, and Programs
- 3.3. Comparing Algorithms
- 3.4. Best, Worst, and Average Cases
- 3.5. Faster Computer, or Faster Algorithm?
- 3.6. Asymptotic Analysis and Upper Bounds
- 3.7. Lower Bounds and \(\Theta\) Notation
- 3.8. Calculating Program Running Time
- 3.9. Analyzing Problems
- 3.10. Common Misunderstandings
- 3.11. Multiple Parameters
- 3.12. Space Bounds
- 3.13. Code Tuning and Empirical Analysis
- 3.14. Algorithm Analysis Summary Exercises
Chapter 4 Linear Structures¶
- 4.1. Chapter Introduction: Lists
- 4.2. The List ADT
- 4.3. Array-Based List Implementation
- 4.4. Linked Lists
- 4.5. Comparison of List Implementations
- 4.6. Doubly Linked Lists
- 4.7. List Element Implementations
- 4.8. Stacks
- 4.9. Linked Stacks
- 4.10. Freelists
- 4.11. Implementing Recursion
- 4.12. Queues
- 4.13. Linked Queues
- 4.14. Linear Structure Summary Exercises
Chapter 5 Binary Trees¶
- 5.1. Binary Trees Chapter Introduction
- 5.2. Binary Trees
- 5.3. Binary Tree as a Recursive Data Structure
- 5.4. The Full Binary Tree Theorem
- 5.5. Binary Tree Traversals
- 5.6. Implementing Tree Traversals
- 5.7. Information Flow in Recursive Functions
- 5.7.1. Information Flow in Recursive Functions
- 5.7.2. Binary Tree Set Depth Exercise
- 5.7.3. Collect-and-return
- 5.7.4. Binary Tree Check Sum Exercise
- 5.7.5. Binary Tree Leaf Nodes Count Exercise
- 5.7.6. Binary Tree Sum Nodes Exercise
- 5.7.7. Combining Information Flows
- 5.7.8. Binary Tree Check Value Exercise
- 5.7.9. Combination Problems
- 5.7.10. Binary Tree Height Exercise
- 5.7.11. Binary Tree Get Difference Exercise
- 5.7.12. Binary Tree Has Path Sum Exercise
- 5.8. Binary Tree Node Implementations
- 5.9. Composite-based Expression Tree
- 5.10. Binary Tree Space Requirements
- 5.11. Binary Search Trees
- 5.12. Dictionary Implementation Using a BST
- 5.13. Binary Tree Guided Information Flow
- 5.14. Multiple Binary Trees
- 5.15. A Hard Information Flow Problem
- 5.16. Array Implementation for Complete Binary Trees
- 5.17. Heaps and Priority Queues
- 5.18. Huffman Coding Trees
- 5.19. Trees versus Tries
- 5.20. Proof of Optimality for Huffman Coding
- 5.21. Binary Tree Chapter Summary
Chapter 6 Searching¶
Chapter 7 Sorting¶
- 7.1. Chapter Introduction: Sorting
- 7.2. Sorting Terminology and Notation
- 7.3. Insertion Sort
- 7.4. Bubble Sort
- 7.5. Selection Sort
- 7.6. The Cost of Exchange Sorting
- 7.7. Optimizing Sort Algorithms with Code Tuning
- 7.8. Shellsort
- 7.9. Mergesort Concepts
- 7.10. Implementing Mergesort
- 7.11. Quicksort
- 7.12. Heapsort
- 7.13. Binsort
- 7.14. Radix Sort
- 7.15. An Empirical Comparison of Sorting Algorithms
- 7.16. Lower Bounds for Sorting
- 7.17. Sorting Summary Exercises