← 返回 amazon 的题目列表Word Search (LeetCode 79)
类型:online_judge
Given an m x n grid of characters board and a string word, return true if word exists in the grid.
The word can be constructed from letters of sequentially adjacent cells (horizontally or vertically). The same cell may not be used more than once in a path.
Implement a function to determine whether word exists in the grid.
Example
Input
board = [[A,B,C,E],[S,F,C,S],[A,D,E,E]]
word = ABCCED
Output
true