Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

dance

wbyoung228MIT0.1.0

Dancing Links

dlx, dancing links, exact cover, algorithm x

readme

Dancing Links Implementation

NPM version Build status Code Climate Dependencies

An implementation of Donald Knuth's Dancing Links Algorithm to solve exact cover problems.

var dlx = require('dancing');
var matrix = [
  [1, 0, 0, 1, 0, 0, 1],
  [1, 0, 0, 1, 0, 0, 0],
  [0, 0, 0, 1, 1, 0, 1],
  [0, 0, 1, 0, 1, 1, 0],
  [0, 1, 1, 0, 0, 1, 1],
  [0, 1, 0, 0, 0, 0, 1]
];
dlx.solve(matrix); //=> [[1, 3, 5]]

License

This project is distributed under the MIT-LICENSE.