Chapter 0 Preface¶
Chapter 1 Introduction for Data Structures and Algorithms Courses¶
Chapter 2 Biographies¶
Chapter 3 Programming Tutorials¶
- 3.1. Command Line Basics
- 3.2. Parsing Command Line Parameters In Your Program
- 3.3. Using Command Line Parameters in Eclipse
- 3.4. Installing the Web-CAT Submission Plug-in for Eclipse
- 3.5. Common Debugging Methods
- 3.6. Debugging In Eclipse
- 3.7. Reading Input (from Files or Otherwise)
- 3.8. Random Access Files In Java
- 3.9. JUnit Testing And You
- 3.10. Writing JUnit Tests
- 3.11. Code Coverage In JUnit
- 3.12. Mutation Coverage In JUnit
- 3.13. Mutation Testing Examples
- 3.13.1. Types of Mutants
- 3.13.1.1. Arithmetic Operation Mutant
- 3.13.1.2. Example Code 1: Arithmetic Operation Mutant
- 3.13.1.3. Logical Expression Mutant (Remove Conditionals)
- 3.13.1.4. Example Code 2: Logical Expression Mutant (Remove Conditionals)
- 3.13.1.5. Example Code 3: Multiple Mutants in One (EvenOddCheck)
- 3.13.1.6. Example Code 4: Loop Conditions (optional)
- 3.13.1. Types of Mutants
- 3.14. Mutation Coverage: FAQ
- 3.14.1. Frequently Asked Questions
- 3.14.1.1. What is Mutation Testing and why should I use it?
- 3.14.1.2. Does 100% Mutation Score mean 100% Project Correctness?
- 3.14.1.3. Why does writing Mutation Tests take so much time?
- 3.14.1.4. Why should I use Mutation Testing instead of Code Coverage?
- 3.14.1.5. Why are we using this particular set of mutation operators?
- 3.14.1.6. Does 100% Mutation Score mean my code is perfect?
- 3.14.1.7. Why do I have bugs in my code despite having 100% Mutation Score?
- 3.14.1.8. Why do my mutation tests not cover all branches of my code?
- 3.14.1.9. How do I localize the bugs in my code?
- 3.14.1.10. How do I recover the “Mutation List”/”Mutation Summary” tabs?
- 3.14.1. Frequently Asked Questions
- 3.15. Testing
- 3.16. Testing for Code Coverage
- 3.17. Another Example
- 3.18. Bowling Example
Chapter 4 Design I¶
Chapter 5 Introduction to Pointers in Java¶
- 5.1. Pointers Chapter Introduction
- 5.2. Basic References Part 1
- 5.3. Basic References Part 2
- 5.4. Pointers Syntax
- 5.5. Local Memory
- 5.6. Heap Memory
- 5.7. Link Nodes
- 5.8. Link Nodes Practice Exercises
- 5.9. Additional Practice Exercises
Chapter 6 Mathematical Background¶
Chapter 7 Searching I¶
Chapter 8 Algorithm Analysis¶
- 8.1. Chapter Introduction
- 8.2. Problems, Algorithms, and Programs
- 8.3. Comparing Algorithms
- 8.4. Best, Worst, and Average Cases
- 8.5. Faster Computer, or Faster Algorithm?
- 8.6. Asymptotic Analysis and Upper Bounds
- 8.7. Lower Bounds and \(\Theta\) Notation
- 8.8. Calculating Program Running Time
- 8.9. Analyzing Problems
- 8.10. Common Misunderstandings
- 8.11. Multiple Parameters
- 8.12. Space Bounds
- 8.13. Code Tuning and Empirical Analysis
- 8.14. Algorithm Analysis Summary Exercises
- 8.15. Algorithm Analysis Summary Exercises
Chapter 9 Linear Structures¶
- 9.1. Chapter Introduction: Lists
- 9.2. The List ADT
- 9.3. Array-Based List Implementation
- 9.4. Linked Lists
- 9.5. Comparison of List Implementations
- 9.6. Doubly Linked Lists
- 9.7. List Element Implementations
- 9.8. Stacks
- 9.9. Linked Stacks
- 9.10. Freelists
- 9.11. Implementing Recursion
- 9.12. Queues
- 9.13. Linked Queues
- 9.14. Linear Structure Summary Exercises
Chapter 10 Recursion¶
- 10.1. Introduction
- 10.2. Writing a recursive function
- 10.3. Code Completion Practice Exercises
- 10.3.1. Introduction
- 10.3.2. Recursion Programming Exercise: Largest
- 10.3.3. Recursion Programming Exercise: Multiply
- 10.3.4. Recursion Programming Exercise: GCD
- 10.3.5. Recursion Programming Exercise: log
- 10.3.6. Recursion Programming Exercise: Cummulative Sum
- 10.3.7. Recursion Programming Exercise: Add odd values
- 10.3.8. Recursion Programming Exercise: Sum Of the Digits
- 10.3.9. Recursion Programming Exercise: Count Characters
- 10.4. Writing More Sophisticated Recursive Functions
- 10.5. Harder Code Completion Practice Exercises
- 10.6. Writing Practice Exercises
- 10.7. Tracing Recursive Code
- 10.8. Tracing Practice Exercises
- 10.9. Summary Exercises
Chapter 11 Design II¶
Chapter 12 Binary Trees¶
- 12.1. Binary Trees Chapter Introduction
- 12.2. Binary Trees
- 12.3. Binary Tree as a Recursive Data Structure
- 12.4. The Full Binary Tree Theorem
- 12.5. Binary Tree Traversals
- 12.6. Implementing Tree Traversals
- 12.7. Information Flow in Recursive Functions
- 12.7.1. Information Flow in Recursive Functions
- 12.7.2. Binary Tree Set Depth Exercise
- 12.7.3. Collect-and-return
- 12.7.4. Binary Tree Check Sum Exercise
- 12.7.5. Binary Tree Leaf Nodes Count Exercise
- 12.7.6. Binary Tree Sum Nodes Exercise
- 12.7.7. Combining Information Flows
- 12.7.8. Binary Tree Check Value Exercise
- 12.7.9. Combination Problems
- 12.7.10. Binary Tree Height Exercise
- 12.7.11. Binary Tree Get Difference Exercise
- 12.7.12. Binary Tree Has Path Sum Exercise
- 12.8. Binary Tree Node Implementations
- 12.9. Composite-based Expression Tree
- 12.10. Binary Tree Space Requirements
- 12.11. Binary Search Trees
- 12.12. Dictionary Implementation Using a BST
- 12.13. Binary Tree Guided Information Flow
- 12.14. Multiple Binary Trees
- 12.15. A Hard Information Flow Problem
- 12.16. Array Implementation for Complete Binary Trees
- 12.17. Heaps and Priority Queues
- 12.18. Huffman Coding Trees
- 12.19. Trees versus Tries
- 12.20. Proof of Optimality for Huffman Coding
- 12.21. Binary Tree Chapter Summary
Chapter 13 Sorting¶
- 13.1. Chapter Introduction: Sorting
- 13.2. Sorting Terminology and Notation
- 13.3. Insertion Sort
- 13.4. Bubble Sort
- 13.5. Selection Sort
- 13.6. The Cost of Exchange Sorting
- 13.7. Optimizing Sort Algorithms with Code Tuning
- 13.8. Shellsort
- 13.9. Mergesort Concepts
- 13.10. Implementing Mergesort
- 13.11. Quicksort
- 13.12. Heapsort
- 13.13. Binsort
- 13.14. Radix Sort
- 13.15. An Empirical Comparison of Sorting Algorithms
- 13.16. Lower Bounds for Sorting
- 13.17. Sorting Summary Exercises
Chapter 14 File Processing¶
Chapter 15 Hashing¶
Chapter 16 Memory Management¶
Chapter 17 Indexing¶
Chapter 18 General Trees¶
Chapter 19 Graphs¶
Chapter 20 Spatial Data Structures¶
Chapter 21 Senior Algorithms Course¶
Chapter 22 Searching¶
Chapter 23 Lower Bounds¶
Chapter 24 Number Problems¶
Chapter 25 Probabilistic Algorithms¶
Chapter 26 Search Structures¶
Chapter 27 Miscellaneous¶
- 27.1. The Sparse Matrix
- 27.2. Dynamic Programming
- 27.3. Amortized Analysis
- 27.4. 0/1 Knapsack Problem
- 27.5. Edit Distance
- 27.6. KMP String Search Algorithm
- 27.7. Boyer-Moore String Search Algorithm
- 27.8. Rabin-Karp String Search Algorithm [Draft]
- 27.9. General Tree Implementations
- 27.10. K-ary Tree Implementations
Chapter 28 Limits to Computing¶
- 28.1. Limits to Computing
- 28.2. Reductions
- 28.3. NP-Completeness
- 28.4. Circuit Satisfiability
- 28.5. Formula Satisfiability
- 28.6. 3-CNF Satisfiability
- 28.7. The Clique Problem
- 28.8. The Independent Set Problem
- 28.9. The Vertex Cover Problem
- 28.10. The Hamiltonian Cycle Problem
- 28.11. The Traveling Salesman Problem
- 28.12. NP-Completeness Proofs
- 28.13. Reduction of Circuit SAT to SAT
- 28.14. Reduction of SAT to 3-SAT
- 28.15. Reduction of 3-SAT to Clique
- 28.16. Reduction of Clique to Independent Set
- 28.17. Reduction of Independent Set to Vertex Cover
- 28.18. Reduction of 3-SAT to Hamiltonian Cycle
- 28.19. Reduction of Hamiltonian Cycle to Traveling Salesman
- 28.20. Coping with NP-Complete Problems
- 28.21. Unsolveable Problems
- 28.22. Turing Machines