Chapter 0 Preface¶
Chapter 1 Introduction¶
Chapter 2 Programming Tutorials¶
Chapter 3 Design I¶
Chapter 4 Pointers¶
- 4.1. Pointers Chapter Introduction
- 4.2. Basic Pointers
- 4.2.1. What is a pointer?
- 4.2.2. Pointer Reference and Dereference
- 4.2.3. Pointer Assignment
- 4.2.4. Bad Pointers
- 4.2.5. Syntax
- 4.2.6. Example Pointer Code
- 4.2.7. Pointer Rules Summary
- 4.2.8. How Do Pointers Work In Java?
- 4.2.9. How Are Pointers Implemented In The Machine?
- 4.2.10. The Term 'Reference'
- 4.2.11. Why Are Bad Pointer Bugs So Common?
- 4.3. Local Memory
- 4.4. Reference Parameters
- 4.5. Heap Memory
- 4.6. Pointers Exercises
Chapter 5 Mathematical Background¶
Chapter 6 Searching I¶
Chapter 7 Algorithm Analysis¶
- 7.1. Chapter Introduction
- 7.2. Problems, Algorithms, and Programs
- 7.3. Comparing Algorithms
- 7.4. Best, Worst, and Average Cases
- 7.5. Faster Computer, or Faster Algorithm?
- 7.6. Asymptotic Analysis and Upper Bounds
- 7.7. Lower Bounds and \(\Theta\) Notation
- 7.8. Calculating Program Running Time
- 7.9. Analyzing Problems
- 7.10. Common Misunderstandings
- 7.11. Multiple Parameters
- 7.12. Space Bounds
- 7.13. Code Tuning and Empirical Analysis
- 7.14. Algorithm Analysis Summary Exercises
Chapter 8 Linear Structures¶
- 8.1. Chapter Introduction: Lists
- 8.2. The List ADT
- 8.3. Array-Based List Implementation
- 8.4. Linked Lists
- 8.5. Comparison of List Implementations
- 8.6. Doubly Linked Lists
- 8.7. List Element Implementations
- 8.8. Stacks
- 8.9. Linked Stacks
- 8.10. Freelists
- 8.11. Implementing Recursion
- 8.12. Queues
- 8.13. Linked Queues
- 8.14. Linear Structure Summary Exercises
Chapter 9 Recursion¶
- 9.1. Introduction
- 9.2. Writing a recursive function
- 9.3. Code Completion Practice Exercises
- 9.3.1. Programming Exercise: Largest
- 9.3.2. Programming Exercise: Multiply
- 9.3.3. Programming Exercise: GCD
- 9.3.4. Programming Exercise: Logs
- 9.3.5. Programming Exercise: Cummulative Sum
- 9.3.6. Programming Exercise: Array Sum
- 9.3.7. Programming Exercise: Digits Sum
- 9.3.8. Programming Exercise: Characters
- 9.4. Writing More Sophisticated Recursive Functions
- 9.5. Harder Code Completion Practice Exercises
- 9.6. Writing Practice Exercises
- 9.7. Tracing Recursive Code
- 9.8. Tracing Practice Exercises
- 9.9. Summary Exercises
Chapter 10 Design II¶
Chapter 11 Binary Trees¶
- 11.1. Binary Trees Chapter Introduction
- 11.2. Binary Trees
- 11.3. Binary Tree as a Recursive Data Structure
- 11.4. The Full Binary Tree Theorem
- 11.5. Binary Tree Traversals
- 11.6. Implementing Tree Traversals
- 11.7. Information Flow in Recursive Functions
- 11.8. Binary Tree Node Implementations
- 11.9. Composite-based Expression Tree
- 11.10. Binary Tree Space Requirements
- 11.11. Binary Search Trees
- 11.12. Dictionary Implementation Using a BST
- 11.13. Binary Tree Guided Information Flow
- 11.14. Multiple Binary Trees
- 11.15. A Hard Information Flow Problem
- 11.16. Array Implementation for Complete Binary Trees
- 11.17. Heaps and Priority Queues
- 11.18. Huffman Coding Trees
- 11.19. Trees versus Tries
- 11.20. Proof of Optimality for Huffman Coding
- 11.21. Binary Tree Chapter Summary
Chapter 12 Sorting¶
- 12.1. Chapter Introduction: Sorting
- 12.2. Sorting Terminology and Notation
- 12.3. Insertion Sort
- 12.4. Bubble Sort
- 12.5. Selection Sort
- 12.6. The Cost of Exchange Sorting
- 12.7. Optimizing Sort Algorithms with Code Tuning
- 12.8. Shellsort
- 12.9. Mergesort Concepts
- 12.10. Implementing Mergesort
- 12.11. Quicksort
- 12.12. Heapsort
- 12.13. Binsort
- 12.14. Radix Sort
- 12.15. An Empirical Comparison of Sorting Algorithms
- 12.16. Lower Bounds for Sorting
- 12.17. Sorting Summary Exercises