feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,22 @@ categories:
|
||||
patterns:
|
||||
- backtracking
|
||||
|
||||
function_signature: "def ambiguous_coordinates(s: str) -> list[str]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "(123)" }
|
||||
expected: ["(1, 2.3)", "(1, 23)", "(1.2, 3)", "(12, 3)"]
|
||||
- input: { s: "(0123)" }
|
||||
expected: ["(0, 1.23)", "(0, 12.3)", "(0, 123)", "(0.1, 2.3)", "(0.1, 23)", "(0.12, 3)"]
|
||||
hidden:
|
||||
- input: { s: "(00011)" }
|
||||
expected: ["(0, 0.011)", "(0.001, 1)"]
|
||||
- input: { s: "(100)" }
|
||||
expected: ["(10, 0)", "(1, 0.0)"]
|
||||
- input: { s: "(12)" }
|
||||
expected: ["(1, 2)"]
|
||||
|
||||
description: |
|
||||
We had some 2-dimensional coordinates, like `"(1, 3)"` or `"(2, 0.5)"`. Then, we removed all commas, decimal points, and spaces and ended up with the string `s`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user