Knuth's Algorithm X

Algorithm for exact cover problem From Wikipedia, the free encyclopedia