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. Common Debugging Methods
- 2.5. Debugging In Eclipse
- 2.6. Reading Input (from Files or Otherwise)
- 2.7. Random Access Files In Java
- 2.8. JUnit Testing And You
- 2.9. Writing JUnit Tests
- 2.10. Code Coverage In JUnit
- 2.11. Testing
- 2.12. Testing for Code Coverage
- 2.13. Another Example
- 2.14. Bowling Example
Chapter 3 Mathematical Background¶
Chapter 4 Recursion¶
- 4.1. Code Completion Practice Exercises
- 4.1.1. Introduction
- 4.1.2. Recursion Programming Exercise: Largest
- 4.1.3. Recursion Programming Exercise: Multiply
- 4.1.4. Recursion Programming Exercise: GCD
- 4.1.5. Recursion Programming Exercise: log
- 4.1.6. Recursion Programming Exercise: Cummulative Sum
- 4.1.7. Recursion Programming Exercise: Add odd positions
- 4.1.8. Recursion Programming Exercise: Sum Of the Digits
- 4.1.9. Recursion Programming Exercise: Count Characters
- 4.2. Harder Code Completion Practice Exercises
- 4.3. Introduction
- 4.4. Summary Exercises
- 4.5. Tracing Practice Exercises
- 4.6. Tracing Recursive Code
- 4.7. Writing More Sophisticated Recursive Functions
- 4.8. Writing Practice Exercises
- 4.9. Writing a recursive function
Chapter 5 Algorithm Analysis¶
- 5.1. Chapter Introduction
- 5.2. Problems, Algorithms, and Programs
- 5.3. Comparing Algorithms
- 5.4. Best, Worst, and Average Cases
- 5.5. Faster Computer, or Faster Algorithm?
- 5.6. Asymptotic Analysis and Upper Bounds
- 5.7. Lower Bounds and \(\Theta\) Notation
- 5.8. Calculating Program Running Time
- 5.9. Analyzing Problems
- 5.10. Common Misunderstandings
- 5.11. Multiple Parameters
- 5.12. Space Bounds
- 5.13. Code Tuning and Empirical Analysis
- 5.14. Algorithm Analysis Summary Exercises
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. Alternative List ADT Designs
- 6.9. Stacks
- 6.10. Linked Stacks
- 6.11. Implementing Recursion
- 6.12. Queues
- 6.13. Linked Queues
- 6.14. Linear Structure Summary Exercises
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. Binary Tree Guided Information Flow
- 7.13. Multiple Binary Trees
- 7.14. A Hard Information Flow Problem
- 7.15. Array Implementation for Complete Binary Trees
- 7.16. Heaps and Priority Queues
- 7.17. Huffman Coding Trees
- 7.18. Trees versus Tries
- 7.19. Proof of Optimality for Huffman Coding
- 7.20. Binary Tree Chapter Summary
Chapter 8 Dictionaries¶
Chapter 9 Searching¶
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