What you need to know to solve basic combinatorial generation problems you might encounter on coding interviews, with plenty of examples in Python.


Generating All Balanced Parentheses: A Deep Dive Into An Interview Question
A deep dive into the generation of balanced parentheses, inspired by a coding interview question.

Understanding Recurrence Relations Using Automata, Python Code, And Javascript Visualizations
Recurrence relations are very often taught in first or secondyear computer science and discrete mathematics courses. This post takes a somewhat different and more visual approach to understanding linear recurrences and solving them by drawing the link between linear recurrences, automata, and matrices, using the problem of generating all dominotilings of a board as the springboard. Code in Python and visualizations in JavaScript are used to demonstrate the ideas.

Combinatorial Generation Using Coroutines With Examples in Python
Approaching combinatorial generation algorithms using coroutines, with examples in Python. Inspired by Knuth's work in his volume 4 of The Art of Computer Programming, as well as his "Deconstructing Coroutines" paper, cowritten with Frank Ruskey.