Word Search
Try to solve the Word Search problem.
We'll cover the following
Statement
Given an 2D grid of characters and word
as a string, we need to determine if the word can be constructed from letters of sequentially adjacent cells. The cells are considered sequentially adjacent when they are neighbors to each other either horizontally or vertically. The function should return TRUE if the word can be constructed and FALSE otherwise.
Constraints:
m
board.length
n
board[i].length
, wherei
m
-
m
,n
-
word.length
board
andword
consist of only lowercase or uppercase English letters.- The search is not case-sensitive.
Examples
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy