Skip to content

Instantly share code, notes, and snippets.

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 = [
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