Skip to content

Instantly share code, notes, and snippets.

// Implements the cool-lex algorithm to generate (n,k)-combinations
// @article{Ruskey:2009fk,
// Author = {Frank Ruskey and Aaron Williams},
// Doi = {10.1016/j.disc.2007.11.048},
// Journal = {Discrete Mathematics},
// Month = {September},
// Number = {17},
// Pages = {5305-5320},
// Title = {The coolest way to generate combinations},
// Url = {http://www.sciencedirect.com/science/article/pii/S0012365X07009570},