Preface¶
Introduction for Data Structures and Algorithms Courses¶
Biographies¶
Programming Tutorials¶
- 3.1. Command Line Basics
- 3.2. Parsing Command Line Parameters In Your Program
- 3.3. Using 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. Testing
- 3.13. Testing for Code Coverage
- 3.14. Another Example
- 3.15. Bowling Example
Design I¶
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
Mathematical Background¶
Searching I¶
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
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
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
Design II¶
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
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
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¶
- 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
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