From c60689d680258b495e9c79365539506a2c2d50ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=E1=BB=93=20V=C4=83n=20H=C3=B2a?= <56647826+hovanhoa@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:53:03 +0700 Subject: [PATCH] Create README - LeetHub --- 0079-word-search/README.md | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 0079-word-search/README.md diff --git a/0079-word-search/README.md b/0079-word-search/README.md new file mode 100644 index 0000000..d0531af --- /dev/null +++ b/0079-word-search/README.md @@ -0,0 +1,39 @@ +
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, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.
+ ++
Example 1:
++Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED" +Output: true ++ +
Example 2:
++Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "SEE" +Output: true ++ +
Example 3:
++Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCB" +Output: false ++ +
+
Constraints:
+ +m == board.length
n = board[i].length
1 <= m, n <= 6
1 <= word.length <= 15
board
and word
consists of only lowercase and uppercase English letters.+
Follow up: Could you use search pruning to make your solution faster with a larger board
?