feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent d2b74b6863
commit 85fea3a4bb
94 changed files with 1840 additions and 0 deletions

View File

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