Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const findWordsInBoard = (board, listOfWords) => {
/* Returns a subset of words in listOfWords
* that can be formed from characters on board
*/
};
const BOARD = [
['g','r','t','a'],
['n','i','a','e'],
['d','k','w','r'],
['t','e','l','v']
];
const listOfWords = ['nile', 'pea', 'eat', 'grind', 'nike', 'vine', 'take', 'die'];
findWordsInBoard(BOARD, listOfWords); //returns ['eat', 'grind', 'nike']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.