Algorithmic Thinking
What an algorithm is, how to specify it formally with Knuth properties, and why correctness and efficiency matter.
Case Study: Maximum Pairwise Product
Step-by-step progression of Maximum Pairwise Product from O(n^2) brute force to O(n), including integer overflow and stress testing.
Data Structures
Arrays, the Java Collections Framework, maps, graphs, and trees, and how data structure choices determine algorithmic cost.
Measuring Efficiency
How to measure execution time and memory reliably in Java: warm-up, JIT compilation, doubling tests, and time ratios.
Complexity Analysis
Counting elementary operations with summations, best/average/worst cases, and space complexity including the call stack.
Asymptotic Notation
Formal definitions and algebraic properties of Big-O, Big-Omega, and Big-Theta notation.
Growth Rates and Predictions
Comparing complexity classes in practice, predicting execution times, and estimating the largest solvable input size.
Complexity of Loops
Practical catalog of loop patterns: additive, multiplicative, nested, square-root, harmonic, and while loops.
Case Studies: Searching
Comparing sequential search, sentinel search, and binary search, including correctness pitfalls and when sorting pays off.
Summary
Chapter 1 summary: key ideas, complexity classes, loop patterns, useful formulas, and searching.
Exercises
Exercises with solutions on specifications, data structures, empirical timing, complexity analysis, loops, and searching.
Proofs
Formal proofs for Chapter 1: Big-O rules, logarithm growth, linear pairwise product, and correctness and cost of searching.
References
Textbooks and original sources for Principles of Algorithmics.