feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,26 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def apply_operations(nums: list[int]) -> list[int]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [1, 2, 2, 1, 1, 0] }
|
||||
expected: [1, 4, 2, 0, 0, 0]
|
||||
- input: { nums: [0, 1] }
|
||||
expected: [1, 0]
|
||||
hidden:
|
||||
- input: { nums: [1, 1] }
|
||||
expected: [2, 0]
|
||||
- input: { nums: [2, 2, 2] }
|
||||
expected: [4, 2, 0]
|
||||
- input: { nums: [0, 0, 0] }
|
||||
expected: [0, 0, 0]
|
||||
- input: { nums: [1, 2, 3, 4] }
|
||||
expected: [1, 2, 3, 4]
|
||||
- input: { nums: [1, 1, 1, 1] }
|
||||
expected: [2, 2, 0, 0]
|
||||
|
||||
description: |
|
||||
You are given a **0-indexed** array `nums` of size `n` consisting of **non-negative** integers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user