word-chain
v1.0.3
Published
An Implementation of the game Word Chain.
Downloads
8
Readme
Word Chain
A Simple implementation of the Word Chain game using backtracking.
Install
$ npm install --save word-chain
Usage
const wordChain = require('word-chain');
const dictionary = ['cat', 'hat', 'hats', 'bats', 'mat', 'mats', 'at', 'bat', 'cog', 'cot', 'dog'];
const result = wordChain('cat', 'dog', dictionary);
//=> ['cat', 'cot', 'cog', 'dog']