A First Course in Algorithms

Author

Bo Waggoner

Published

Aug 1, 2025

Modified

Feb 26, 2026

silly cover art with circles and lines

About this book

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.

Some inline exercises are included.

Book homepage: https://bwag.prof/firstalg/

Prerequisites

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)\).

License and Citation

Created with Quarto.

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/}
}