This book covers a one-semester undergraduate course in Algorithms. It grew out of a set of lecture notes and is best-suited as technical reference material rather than as a fully stand-alone algorithms text.
The book covers the following seven "Topics", each of roughly equal size. (Hash tables are placed in a topic with P vs. NP for this logistical reason.)
Programming: Experience reading and writing short programs; familiarity with variables, loops, conditionals (if statements), and so on. Ability to step through the execution of a short program using pen and paper. Experience with recursion. Familiarity with python syntax is beneficial.
Data Structures: Arrays, lists, queues. Familiarity with binary search trees is beneficial.
Discrete Math: Proofs; proofs of "there exists" and "for all" statements. Proof by induction. Counting, summations, sums of series such as $1 + 2 + \cdots + n$. Modular arithmetic. Familiarity with graphs and trees is beneficial. Basic probability is slightly beneficial.
Calculus: Derivatives. Limits. Properties of exponentials and logarithms, such as $2^{x+y} = 2^x 2^y$ and $\log(x^k) = k \log(x)$.
Please send feedback, suggestions, and error reports by email to Bo Waggoner with a subject line like "First Course in Algorithms".
License: [CC-BY]. You may distribute, remix, adapt, and build upon this material in any medium or format so long as attribution is given.
Citation:
@book{waggoner2025first,
title = {A First Course in Algorithms},
author = {Waggoner, Bo},
year = {2025},
publisher = {Self published},
url = {https://bwag.prof/firstalg/}
}