Gamified challenge · Tries
The board is a rectangle of lowercase letter tiles: board[r] is row r as a string. A word is traced by starting on any tile and stepping to a tile directly up, down, left or right, reading one letter per tile. A tile can be used at most once in the same word.
Write findWords(board, words) (Python: find_words(board, words)) that returns every word of the dictionary words (distinct lowercase strings) that can be traced on the board, each once, in any order. Return an empty list if none can.
Example: on the board ["cats", "ored", "wing", "seal"], "core" is traced c (0,0) → o (1,0) → r (1,1) → e (1,2), but "dog" can't be: no o touches the d.
This game is part of the paid plans. Sign in, then pick a plan to write your answer, watch it play out, and step through the algorithm with its guide.
Sign in with Google