medium Backtracking 35 points

Word Search

Given an m x n grid of characters and a string word, return true if the word exists in the grid. The word can be constructed from sequentially adjacent cells (horizontally or vertically), and each cell may only be used once.

Problem Description

Given an m x n grid of characters and a string word, return true if the word exists in the grid. The word can be constructed from sequentially adjacent cells (horizontally or vertically), and each cell may only be used once.

Examples

Example

Input: [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], "ABCCED"

Output: true

Challenge Info

35 Points

Reward

medium

Difficulty

No limit

Time Limit

Submission Stats

Total Submissions 0
Accepted 17
Success Rate 0%