feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,24 @@ categories:
|
||||
patterns:
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def cells_in_range(s: str) -> list[str]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "K1:L2" }
|
||||
expected: ["K1", "K2", "L1", "L2"]
|
||||
- input: { s: "A1:F1" }
|
||||
expected: ["A1", "B1", "C1", "D1", "E1", "F1"]
|
||||
hidden:
|
||||
- input: { s: "A1:A1" }
|
||||
expected: ["A1"]
|
||||
- input: { s: "A1:A3" }
|
||||
expected: ["A1", "A2", "A3"]
|
||||
- input: { s: "B2:D4" }
|
||||
expected: ["B2", "B3", "B4", "C2", "C3", "C4", "D2", "D3", "D4"]
|
||||
- input: { s: "Z1:Z9" }
|
||||
expected: ["Z1", "Z2", "Z3", "Z4", "Z5", "Z6", "Z7", "Z8", "Z9"]
|
||||
|
||||
description: |
|
||||
A cell `(r, c)` of an Excel sheet is represented as a string `"<col><row>"` where:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user