Chapter 0 Introduction¶
Chapter 1 Algorithm Analysis¶
- 1.1. Chapter Introduction
- 1.2. Problems, Algorithms, and Programs
- 1.3. Searching in an Array
- 1.4. Comparing Algorithms
- 1.5. Best, Worst, and Average Cases
- 1.6. Faster Computer, or Faster Algorithm?
- 1.7. Asymptotic Analysis and Upper Bounds
- 1.8. Lower Bounds and \(\Theta\) Notation
- 1.9. Calculating Program Running Time
- 1.10. Analyzing Problems
- 1.11. Common Misunderstandings
- 1.12. Multiple Parameters
- 1.13. Space Bounds
- 1.14. Code Tuning and Empirical Analysis
Chapter 2 Linear Structures¶
- 2.1. Chapter Introduction: Lists
- 2.2. The List ADT
- 2.3. Array-Based List Implementation
- 2.4. Linked Lists
- 2.5. Comparison of List Implementations
- 2.6. Doubly Linked Lists
- 2.7. List Element Implementations
- 2.8. Stacks
- 2.9. Linked Stacks
- 2.10. Freelists
- 2.11. Implementing Recursion
- 2.12. Queues
- 2.13. Linked Queues
- 2.14. Linear Structure Summary Exercises
Chapter 3 Recursion¶
- 3.1. Introduction
- 3.2. Writing a recursive function
- 3.3. Code Completion Practice Exercises
- 3.3.1. Introduction
- 3.3.2. Recursion Programming Exercise: Largest
- 3.3.3. Recursion Programming Exercise: Multiply
- 3.3.4. Recursion Programming Exercise: GCD
- 3.3.5. Recursion Programming Exercise: log
- 3.3.6. Recursion Programming Exercise: Cummulative Sum
- 3.3.7. Recursion Programming Exercise: Add odd positions
- 3.3.8. Recursion Programming Exercise: Sum Of the Digits
- 3.3.9. Recursion Programming Exercise: Count 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 Sorting¶
- 4.1. Chapter Introduction: Sorting
- 4.2. Sorting Terminology and Notation
- 4.3. Insertion Sort
- 4.4. Bubble Sort
- 4.5. Selection Sort
- 4.6. The Cost of Exchange Sorting
- 4.7. Optimizing Sort Algorithms with Code Tuning
- 4.8. Shellsort
- 4.9. Mergesort Concepts
- 4.10. Implementing Mergesort
- 4.11. Quicksort
- 4.12. Heapsort
- 4.13. Binsort
- 4.14. Radix Sort
- 4.15. An Empirical Comparison of Sorting Algorithms
- 4.16. Lower Bounds for Sorting
- 4.17. Sorting 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
- 5.22. 2-3 Trees
- 5.23. B-Trees
Chapter 6 Hashing¶
Chapter 7 Graphs¶
Chapter 8 Appendix¶
Chapter 9 Programming Tutorials¶
- 9.1. Command Line Basics
- 9.2. Parsing Command Line Parameters In Your Progam
- 9.3. Using Parameters in Eclipse
- 9.4. Common Debugging Methods
- 9.5. Debugging In Eclipse
- 9.6. Reading Input (from Files or Otherwise)
- 9.7. Random Access Files In Java
- 9.8. JUnit Testing And You
- 9.9. Writing JUnit Tests
- 9.10. Code Coverage In JUnit