Your question is Find String in a Character Matrix. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A Smartsheet grid contains single-character cell values. Given a rectangular character matrix board and a target string word, determine whether the word can be formed from adjacent cells.
A word path may move up, down, left, or right. Diagonal movement is not allowed, and the same cell may not be used more than once in one path.
Implement exist_word(board, word):
board, a non-empty rectangular list of lists of one-character strings, and word, a non-empty string.True if some valid path spells word; otherwise, return False.def exist_word(board, word):