Chapter 0 Preface¶
Chapter 1 Introduction¶
Chapter 2 Mathematical Background¶
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. Calculating Program Running Time
- 3.8. Multiple Parameters
- 3.9. Space Bounds
- 3.10. Code Tuning and Empirical Analysis
- 3.11. Algorithm Analysis Summary Exercises
Chapter 4 Searching I¶
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 Recursion¶
- 6.1. Introduction
- 6.2. Writing a recursive function
- 6.3. Code Completion Practice Exercises
- 6.3.1. Introduction
- 6.3.2. Recursion Programming Exercise: Largest
- 6.3.3. Recursion Programming Exercise: Multiply
- 6.3.4. Recursion Programming Exercise: GCD
- 6.3.5. Recursion Programming Exercise: log
- 6.3.6. Recursion Programming Exercise: Cummulative Sum
- 6.3.7. Recursion Programming Exercise: Add odd positions
- 6.3.8. Recursion Programming Exercise: Sum Of the Digits
- 6.3.9. Recursion Programming Exercise: Count Characters
- 6.4. Writing More Sophisticated Recursive Functions
- 6.5. Harder Code Completion Practice Exercises
- 6.6. Writing Practice Exercises
- 6.7. Tracing Recursive Code
- 6.8. Tracing Practice Exercises
- 6.9. Summary Exercises
Chapter 7 Design¶
Chapter 8 Binary Trees¶
- 8.1. Binary Trees Chapter Introduction
- 8.2. Binary Trees
- 8.3. Binary Tree as a Recursive Data Structure
- 8.4. Binary Tree Traversals
- 8.5. Implementing Tree Traversals
- 8.6. Information Flow in Recursive Functions
- 8.6.1. Information Flow in Recursive Functions
- 8.6.2. Binary Tree Set Depth Exercise
- 8.6.3. Collect-and-return
- 8.6.4. Binary Tree Check Sum Exercise
- 8.6.5. Binary Tree Leaf Nodes Count Exercise
- 8.6.6. Binary Tree Sum Nodes Exercise
- 8.6.7. Combining Information Flows
- 8.6.8. Binary Tree Check Value Exercise
- 8.6.9. Combination Problems
- 8.6.10. Binary Tree Height Exercise
- 8.6.11. Binary Tree Get Difference Exercise
- 8.6.12. Binary Tree Has Path Sum Exercise
- 8.7. Binary Tree Node Implementations
- 8.8. Composite-based Expression Tree
- 8.9. Binary Tree Space Requirements
- 8.10. Binary Search Trees
- 8.11. Dictionary Implementation Using a BST
- 8.12. Binary Tree Guided Information Flow
- 8.13. Multiple Binary Trees
- 8.14. A Hard Information Flow Problem
- 8.15. Balanced Trees
- 8.16. The AVL Tree
- 8.17. The Red-Black Tree
- 8.18. Array Implementation for Complete Binary Trees
- 8.19. Heaps and Priority Queues
- 8.20. Binary Tree Chapter Summary