Chapter 0 Preface¶
Chapter 1 Introduction and Review¶
Chapter 2 Mathematical Background¶
Chapter 3 Recursion¶
- 3.1. Introduction
- 3.2. Writing a recursive function
- 3.3. Code Completion Practice Exercises
- 3.3.1. Programming Exercise: Largest
- 3.3.2. Programming Exercise: Multiply
- 3.3.3. Programming Exercise: GCD
- 3.3.4. Programming Exercise: Logs
- 3.3.5. Programming Exercise: Cummulative Sum
- 3.3.6. Programming Exercise: Array Sum
- 3.3.7. Programming Exercise: Digits Sum
- 3.3.8. Programming Exercise: Characters
- 3.4. Writing More Sophisticated Recursive Functions
- 3.5. Harder Code Completion Practice Exercises
- 3.6. Writing Practice Exercises
- 3.7. Tracing Recursive Code
- 3.8. Tracing Practice Exercises
- 3.9. Summary Exercises
Chapter 4 Algorithm Analysis¶
- 4.1. Chapter Introduction
- 4.2. Problems, Algorithms, and Programs
- 4.3. Comparing Algorithms
- 4.4. Best, Worst, and Average Cases
- 4.5. Faster Computer, or Faster Algorithm?
- 4.6. Asymptotic Analysis and Upper Bounds
- 4.7. Lower Bounds and \(\Theta\) Notation
- 4.8. Calculating Program Running Time
- 4.9. Analyzing Problems
- 4.10. Common Misunderstandings
- 4.11. Multiple Parameters
- 4.12. Space Bounds
- 4.13. Code Tuning and Empirical Analysis
- 4.14. Algorithm Analysis Summary Exercises
Chapter 5 Linear Structures¶
- 5.1. Chapter Introduction: Lists
- 5.2. The List ADT
- 5.3. Array-Based List Implementation
- 5.4. Linked Lists
- 5.5. Comparison of List Implementations
- 5.6. Doubly Linked Lists
- 5.7. List Element Implementations
- 5.8. Stacks
- 5.9. Linked Stacks
- 5.10. Freelists
- 5.11. Implementing Recursion
- 5.12. Queues
- 5.13. Linked Queues
- 5.14. Linear Structure Summary Exercises
Chapter 6 Design¶
Chapter 7 Binary Trees¶
- 7.1. Binary Trees Chapter Introduction
- 7.2. Binary Trees
- 7.3. Binary Tree as a Recursive Data Structure
- 7.4. The Full Binary Tree Theorem
- 7.5. Binary Tree Traversals
- 7.6. Implementing Tree Traversals
- 7.7. Information Flow in Recursive Functions
- 7.8. Binary Tree Node Implementations
- 7.9. Composite-based Expression Tree
- 7.10. Binary Tree Space Requirements
- 7.11. Binary Search Trees
- 7.12. Dictionary Implementation Using a BST
- 7.13. Binary Tree Guided Information Flow
- 7.14. Multiple Binary Trees
- 7.15. A Hard Information Flow Problem
- 7.16. Array Implementation for Complete Binary Trees
- 7.17. Heaps and Priority Queues
- 7.18. Huffman Coding Trees
- 7.19. Trees versus Tries
- 7.20. Proof of Optimality for Huffman Coding
- 7.21. Binary Tree Chapter Summary
Chapter 8 Sorting¶
- 8.1. Chapter Introduction: Sorting
- 8.2. Sorting Terminology and Notation
- 8.3. Insertion Sort
- 8.4. Bubble Sort
- 8.5. Selection Sort
- 8.6. The Cost of Exchange Sorting
- 8.7. Optimizing Sort Algorithms with Code Tuning
- 8.8. Shellsort
- 8.9. Mergesort Concepts
- 8.10. Implementing Mergesort
- 8.11. Quicksort
- 8.12. Heapsort
- 8.13. Binsort
- 8.14. Radix Sort
- 8.15. An Empirical Comparison of Sorting Algorithms
- 8.16. Lower Bounds for Sorting
- 8.17. Sorting Summary Exercises