feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,28 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def build_array(target: list[int], n: int) -> list[str]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { target: [1, 3], n: 3 }
|
||||
expected: ["Push", "Push", "Pop", "Push"]
|
||||
- input: { target: [1, 2, 3], n: 3 }
|
||||
expected: ["Push", "Push", "Push"]
|
||||
- input: { target: [1, 2], n: 4 }
|
||||
expected: ["Push", "Push"]
|
||||
hidden:
|
||||
- input: { target: [1], n: 1 }
|
||||
expected: ["Push"]
|
||||
- input: { target: [2], n: 2 }
|
||||
expected: ["Push", "Pop", "Push"]
|
||||
- input: { target: [3], n: 5 }
|
||||
expected: ["Push", "Pop", "Push", "Pop", "Push"]
|
||||
- input: { target: [1, 4], n: 5 }
|
||||
expected: ["Push", "Push", "Pop", "Push", "Pop", "Push"]
|
||||
- input: { target: [2, 3, 4], n: 4 }
|
||||
expected: ["Push", "Pop", "Push", "Push", "Push"]
|
||||
|
||||
description: |
|
||||
You are given an integer array `target` and an integer `n`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user