Chapter 0 Preface¶
Chapter 1 Introduction for Data Structures and Algorithms Courses¶
Chapter 2 Object Oriented Programming¶
Chapter 3 Mathematical Background¶
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 Searching I¶
Chapter 6 Linear Structures¶
- 6.1. Chapter Introduction: Lists
- 6.2. The List ADT
- 6.3. Array-Based List Implementation
- 6.4. Linked Lists
- 6.5. Comparison of List Implementations
- 6.6. Doubly Linked Lists
- 6.7. List Element Implementations
- 6.8. Stacks
- 6.9. Linked Stacks
- 6.10. Freelists
- 6.11. Implementing Recursion
- 6.12. Queues
- 6.13. Linked Queues
- 6.14. Linear Structure Summary Exercises
Chapter 7 Recursion¶
- 7.1. Introduction
- 7.2. Writing a recursive function
- 7.3. Code Completion Practice Exercises
- 7.3.1. Introduction
- 7.3.2. Recursion Programming Exercise: Largest
- 7.3.3. Recursion Programming Exercise: Multiply
- 7.3.4. Recursion Programming Exercise: GCD
- 7.3.5. Recursion Programming Exercise: log
- 7.3.6. Recursion Programming Exercise: Cummulative Sum
- 7.3.7. Recursion Programming Exercise: Add odd positions
- 7.3.8. Recursion Programming Exercise: Sum Of the Digits
- 7.3.9. Recursion Programming Exercise: Count Characters
- 7.4. Writing More Sophisticated Recursive Functions
- 7.5. Harder Code Completion Practice Exercises
- 7.6. Writing Practice Exercises
- 7.7. Tracing Recursive Code
- 7.8. Tracing Practice Exercises
- 7.9. Summary Exercises
Chapter 8 Design¶
Chapter 9 Binary Trees¶
- 9.1. Binary Trees Chapter Introduction
- 9.2. Binary Trees
- 9.3. Binary Tree as a Recursive Data Structure
- 9.4. The Full Binary Tree Theorem
- 9.5. Binary Tree Traversals
- 9.6. Implementing Tree Traversals
- 9.7. Information Flow in Recursive Functions
- 9.7.1. Information Flow in Recursive Functions
- 9.7.2. Binary Tree Set Depth Exercise
- 9.7.3. Collect-and-return
- 9.7.4. Binary Tree Check Sum Exercise
- 9.7.5. Binary Tree Leaf Nodes Count Exercise
- 9.7.6. Binary Tree Sum Nodes Exercise
- 9.7.7. Combining Information Flows
- 9.7.8. Binary Tree Check Value Exercise
- 9.7.9. Combination Problems
- 9.7.10. Binary Tree Height Exercise
- 9.7.11. Binary Tree Get Difference Exercise
- 9.7.12. Binary Tree Has Path Sum Exercise
- 9.8. Binary Tree Node Implementations
- 9.9. Composite-based Expression Tree
- 9.10. Binary Tree Space Requirements
- 9.11. Binary Search Trees
- 9.12. Dictionary Implementation Using a BST
- 9.13. Binary Tree Guided Information Flow
- 9.14. Multiple Binary Trees
- 9.15. A Hard Information Flow Problem
- 9.16. Array Implementation for Complete Binary Trees
- 9.17. Heaps and Priority Queues
- 9.18. Balanced Trees
- 9.19. The AVL Tree
- 9.20. The Splay Tree
- 9.21. The Red-Black Tree
- 9.22. Binary Tree Chapter Summary
Chapter 10 Sorting¶
- 10.1. Chapter Introduction: Sorting
- 10.2. Sorting Terminology and Notation
- 10.3. Insertion Sort
- 10.4. Bubble Sort
- 10.5. Selection Sort
- 10.6. The Cost of Exchange Sorting
- 10.7. Optimizing Sort Algorithms with Code Tuning
- 10.8. Shellsort
- 10.9. Mergesort Concepts
- 10.10. Implementing Mergesort
- 10.11. Quicksort
- 10.12. Heapsort
- 10.13. Binsort
- 10.14. Radix Sort
- 10.15. An Empirical Comparison of Sorting Algorithms
- 10.16. Lower Bounds for Sorting
- 10.17. Sorting Summary Exercises