Preface¶
Introduction for Data Structures and Algorithms Courses¶
Biographies¶
Programming Tutorials¶
- -1.1. Command Line Basics
- -1.2. Parsing Command Line Parameters In Your Program
- -1.3. Using Command Line Parameters in Eclipse
- -1.4. Installing the Web-CAT Submission Plug-in for Eclipse
- -1.5. Common Debugging Methods
- -1.6. Debugging In Eclipse
- -1.7. Reading Input (from Files or Otherwise)
- -1.8. Random Access Files In Java
- -1.9. JUnit Testing And You
- -1.10. Writing JUnit Tests
- -1.11. Code Coverage In JUnit
- -1.12. Mutation Coverage In JUnit
- -1.13. Mutation Testing Examples
- -1.13.1. Types of Mutants
- -1.13.1.1. Arithmetic Operation Mutant
- -1.13.1.2. Example Code 1: Arithmetic Operation Mutant
- -1.13.1.3. Logical Expression Mutant (Remove Conditionals)
- -1.13.1.4. Example Code 2: Logical Expression Mutant (Remove Conditionals)
- -1.13.1.5. Example Code 3: Multiple Mutants in One (EvenOddCheck)
- -1.13.1.6. Example Code 4: Loop Conditions (optional)
- -1.13.1. Types of Mutants
- -1.14. Mutation Coverage: FAQ
- -1.14.1. Frequently Asked Questions
- -1.14.1.1. What is Mutation Testing and why should I use it?
- -1.14.1.2. Does 100% Mutation Score mean 100% Project Correctness?
- -1.14.1.3. Why does writing Mutation Tests take so much time?
- -1.14.1.4. Why should I use Mutation Testing instead of Code Coverage?
- -1.14.1.5. Why are we using this particular set of mutation operators?
- -1.14.1.6. Does 100% Mutation Score mean my code is perfect?
- -1.14.1.7. Why do I have bugs in my code despite having 100% Mutation Score?
- -1.14.1.8. Why do my mutation tests not cover all branches of my code?
- -1.14.1.9. How do I localize the bugs in my code?
- -1.14.1.10. How do I recover the “Mutation List”/”Mutation Summary” tabs?
- -1.14.1. Frequently Asked Questions
- -1.15. Testing
- -1.16. Testing for Code Coverage
- -1.17. Another Example
- -1.18. Bowling Example
Design I¶
Introduction to Pointers in Java¶
- -1.1. Pointers Chapter Introduction
- -1.2. Basic References Part 1
- -1.3. Basic References Part 2
- -1.4. Pointers Syntax
- -1.5. Local Memory
- -1.6. Heap Memory
- -1.7. Link Nodes
- -1.8. Link Nodes Practice Exercises
- -1.9. Additional Practice Exercises
Mathematical Background¶
Searching I¶
Algorithm Analysis¶
- -1.1. Chapter Introduction
- -1.2. Problems, Algorithms, and Programs
- -1.3. Comparing Algorithms
- -1.4. Best, Worst, and Average Cases
- -1.5. Faster Computer, or Faster Algorithm?
- -1.6. Asymptotic Analysis and Upper Bounds
- -1.7. Lower Bounds and \(\Theta\) Notation
- -1.8. Calculating Program Running Time
- -1.9. Analyzing Problems
- -1.10. Common Misunderstandings
- -1.11. Multiple Parameters
- -1.12. Space Bounds
- -1.13. Code Tuning and Empirical Analysis
- -1.14. Algorithm Analysis Summary Exercises
- -1.15. Algorithm Analysis Summary Exercises
Linear Structures¶
- -1.1. Chapter Introduction: Lists
- -1.2. The List ADT
- -1.3. Array-Based List Implementation
- -1.4. Linked Lists
- -1.5. Comparison of List Implementations
- -1.6. Doubly Linked Lists
- -1.7. List Element Implementations
- -1.8. Stacks
- -1.9. Linked Stacks
- -1.10. Freelists
- -1.11. Implementing Recursion
- -1.12. Queues
- -1.13. Linked Queues
- -1.14. Linear Structure Summary Exercises
Recursion¶
- -1.1. Introduction
- -1.2. Writing a recursive function
- -1.3. Code Completion Practice Exercises
- -1.3.1. Introduction
- -1.3.2. Recursion Programming Exercise: Largest
- -1.3.3. Recursion Programming Exercise: Multiply
- -1.3.4. Recursion Programming Exercise: GCD
- -1.3.5. Recursion Programming Exercise: log
- -1.3.6. Recursion Programming Exercise: Cummulative Sum
- -1.3.7. Recursion Programming Exercise: Add odd values
- -1.3.8. Recursion Programming Exercise: Sum Of the Digits
- -1.3.9. Recursion Programming Exercise: Count Characters
- -1.4. Writing More Sophisticated Recursive Functions
- -1.5. Harder Code Completion Practice Exercises
- -1.6. Writing Practice Exercises
- -1.7. Tracing Recursive Code
- -1.8. Tracing Practice Exercises
- -1.9. Recursion Summary Exercises
Design II¶
Binary Trees¶
- -1.1. Binary Trees Chapter Introduction
- -1.2. Binary Trees
- -1.3. Binary Tree as a Recursive Data Structure
- -1.4. The Full Binary Tree Theorem
- -1.5. Binary Tree Traversals
- -1.6. Implementing Tree Traversals
- -1.7. Information Flow in Recursive Functions
- -1.7.1. Information Flow in Recursive Functions
- -1.7.2. Binary Tree Set Depth Exercise
- -1.7.3. Collect-and-return
- -1.7.4. Binary Tree Check Sum Exercise
- -1.7.5. Binary Tree Leaf Nodes Count Exercise
- -1.7.6. Binary Tree Sum Nodes Exercise
- -1.7.7. Combining Information Flows
- -1.7.8. Binary Tree Check Value Exercise
- -1.7.9. Combination Problems
- -1.7.10. Binary Tree Height Exercise
- -1.7.11. Binary Tree Get Difference Exercise
- -1.7.12. Binary Tree Has Path Sum Exercise
- -1.8. Binary Tree Node Implementations
- -1.9. Composite-based Expression Tree
- -1.10. Binary Tree Space Requirements
- -1.11. Binary Search Trees
- -1.12. Dictionary Implementation Using a BST
- -1.13. Binary Tree Guided Information Flow
- -1.14. Multiple Binary Trees
- -1.15. A Hard Information Flow Problem
- -1.16. Array Implementation for Complete Binary Trees
- -1.17. Heaps and Priority Queues
- -1.18. Huffman Coding Trees
- -1.19. Trees versus Tries
- -1.20. Proof of Optimality for Huffman Coding
- -1.21. Binary Tree Chapter Summary
Sorting¶
- -1.1. Chapter Introduction: Sorting
- -1.2. Sorting Terminology and Notation
- -1.3. Insertion Sort
- -1.4. Bubble Sort
- -1.5. Selection Sort
- -1.6. The Cost of Exchange Sorting
- -1.7. Optimizing Sort Algorithms with Code Tuning
- -1.8. Shellsort
- -1.9. Mergesort Concepts
- -1.10. Implementing Mergesort
- -1.11. Quicksort
- -1.12. Heapsort
- -1.13. Binsort
- -1.14. Radix Sort
- -1.15. An Empirical Comparison of Sorting Algorithms
- -1.16. Lower Bounds for Sorting
- -1.17. Sorting Summary Exercises
File Processing¶
Hashing¶
Memory Management¶
Indexing¶
General Trees¶
Graphs¶
Spatial Data Structures¶
Senior Algorithms Course¶
Searching¶
Lower Bounds¶
Number Problems¶
Probabilistic Algorithms¶
Search Structures¶
Miscellaneous¶
- -1.1. The Sparse Matrix
- -1.2. Dynamic Programming
- -1.3. Amortized Analysis
- -1.4. 0/1 Knapsack Problem
- -1.5. Edit Distance
- -1.6. KMP String Search Algorithm
- -1.7. Boyer-Moore String Search Algorithm
- -1.8. Rabin-Karp String Search Algorithm [Draft]
- -1.9. General Tree Implementations
- -1.10. K-ary Tree Implementations
Limits to Computing¶
- -1.1. Limits to Computing
- -1.2. Reductions
- -1.3. NP-Completeness
- -1.4. Circuit Satisfiability
- -1.5. Formula Satisfiability
- -1.6. 3-CNF Satisfiability
- -1.7. The Clique Problem
- -1.8. The Independent Set Problem
- -1.9. The Vertex Cover Problem
- -1.10. The Hamiltonian Cycle Problem
- -1.11. The Traveling Salesman Problem
- -1.12. NP-Completeness Proofs
- -1.13. Reduction of Circuit SAT to SAT
- -1.14. Reduction of SAT to 3-SAT
- -1.15. Reduction of 3-SAT to Clique
- -1.16. Reduction of Clique to Independent Set
- -1.17. Reduction of Independent Set to Vertex Cover
- -1.18. Reduction of 3-SAT to Hamiltonian Cycle
- -1.19. Reduction of Hamiltonian Cycle to Traveling Salesman
- -1.20. Coping with NP-Complete Problems
- -1.21. Unsolveable Problems
- -1.22. Turing Machines