Algorithm X in 30 lines!

algorithm-xexact-coverdancing-linkspythonsudokucombinatorics

Abstraction: Compact Python implementation of Knuth's Algorithm X for exact cover

Key points:

Connections: Donald Knuth · Exact Cover · Dancing Links · Backtracking

Source: http://www.cs.mcgill.ca/~aassaf9/python/algorithm_x.html