feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 8544efb5bf
commit e0bf8cda01
134 changed files with 2075 additions and 0 deletions

View File

@@ -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*.