79. Word Search

Practice Word Search for free on NudgeCode: Medium, Backtracking pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.

Return true if word can be spelled by walking through board, moving one cell up, down, left or right at each step, without using any cell more than once. Otherwise return false.

Example

board = [["A","B","C","E"],
         ["S","F","C","S"],
         ["A","D","E","E"]]
word = "ABCCED"  ->  true
word = "ABCB"    ->  false   (would reuse the B)

Constraints