feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,22 @@ categories:
|
||||
patterns:
|
||||
- backtracking
|
||||
|
||||
function_signature: "def letter_combinations(digits: str) -> list[str]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { digits: "23" }
|
||||
expected: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]
|
||||
- input: { digits: "" }
|
||||
expected: []
|
||||
- input: { digits: "2" }
|
||||
expected: ["a", "b", "c"]
|
||||
hidden:
|
||||
- input: { digits: "7" }
|
||||
expected: ["p", "q", "r", "s"]
|
||||
- input: { digits: "79" }
|
||||
expected: ["pw", "px", "py", "pz", "qw", "qx", "qy", "qz", "rw", "rx", "ry", "rz", "sw", "sx", "sy", "sz"]
|
||||
|
||||
description: |
|
||||
Given a string containing digits from `2-9` inclusive, return all possible letter combinations that the number could represent. Return the answer in **any order**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user