feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,26 @@ categories:
|
||||
patterns:
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def alphabet_board_path(target: str) -> str:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { target: "leet" }
|
||||
expected: "DDR!UURRR!!DDD!"
|
||||
- input: { target: "code" }
|
||||
expected: "RR!DDRR!UUL!R!"
|
||||
hidden:
|
||||
- input: { target: "a" }
|
||||
expected: "!"
|
||||
- input: { target: "z" }
|
||||
expected: "DDDDD!"
|
||||
- input: { target: "zdz" }
|
||||
expected: "DDDDD!UUUUURRR!LLLDDDDD!"
|
||||
- input: { target: "aa" }
|
||||
expected: "!!"
|
||||
- input: { target: "abc" }
|
||||
expected: "!R!R!"
|
||||
|
||||
description: |
|
||||
On an alphabet board, we start at position `(0, 0)`, corresponding to character `board[0][0]`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user