Chapter 0 Preface¶
Chapter 1 Introduction¶
Chapter 2 Programming Tutorials¶
- 2.1. Command Line Basics
- 2.2. Parsing Command Line Parameters In Your Progam
- 2.3. Using Parameters in Eclipse
- 2.4. Installing the Web-CAT Submission Plug-in for Eclipse
- 2.5. Common Debugging Methods
- 2.6. Debugging In Eclipse
- 2.7. Reading Input (from Files or Otherwise)
- 2.8. Random Access Files In Java
- 2.9. JUnit Testing And You
- 2.10. Writing JUnit Tests
- 2.11. Code Coverage In JUnit
- 2.12. Testing
- 2.13. Testing for Code Coverage
- 2.14. Another Example
- 2.15. Bowling Example
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 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.7.1. Information Flow in Recursive Functions
- 7.7.2. Binary Tree Set Depth Exercise
- 7.7.3. Collect-and-return
- 7.7.4. Binary Tree Check Sum Exercise
- 7.7.5. Binary Tree Leaf Nodes Count Exercise
- 7.7.6. Binary Tree Sum Nodes Exercise
- 7.7.7. Combining Information Flows
- 7.7.8. Binary Tree Check Value Exercise
- 7.7.9. Combination Problems
- 7.7.10. Binary Tree Height Exercise
- 7.7.11. Binary Tree Get Difference Exercise
- 7.7.12. Binary Tree Has Path Sum Exercise
- 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