feat(content): hidden test cases
This commit is contained in:
@@ -12,6 +12,32 @@ patterns:
|
||||
- backtracking
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def find_words(board: list[list[str]], words: list[str]) -> list[str]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input:
|
||||
board: [["o", "a", "a", "n"], ["e", "t", "a", "e"], ["i", "h", "k", "r"], ["i", "f", "l", "v"]]
|
||||
words: ["oath", "pea", "eat", "rain"]
|
||||
expected: ["eat", "oath"]
|
||||
- input:
|
||||
board: [["a", "b"], ["c", "d"]]
|
||||
words: ["abcb"]
|
||||
expected: []
|
||||
hidden:
|
||||
- input:
|
||||
board: [["a"]]
|
||||
words: ["a"]
|
||||
expected: ["a"]
|
||||
- input:
|
||||
board: [["a", "b"], ["c", "d"]]
|
||||
words: ["ab", "cb", "ad", "bd", "ac", "ca", "da", "bc", "db", "adcb", "dabc", "abb", "acb"]
|
||||
expected: ["ab", "ac", "bd", "ca", "db"]
|
||||
- input:
|
||||
board: [["o", "a", "b", "n"], ["o", "t", "a", "e"], ["a", "h", "k", "r"], ["a", "f", "l", "v"]]
|
||||
words: ["oa", "oaa"]
|
||||
expected: ["oa", "oaa"]
|
||||
|
||||
description: |
|
||||
Given an `m x n` `board` of characters and a list of strings `words`, return *all words on the board*.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user