feat(content): function signatures + test cases
This commit is contained in:
@@ -8,6 +8,26 @@ categories:
|
||||
patterns:
|
||||
- dfs
|
||||
|
||||
function_signature: "def array_nesting(nums: list[int]) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [5, 4, 0, 3, 1, 6, 2] }
|
||||
expected: 4
|
||||
- input: { nums: [0, 1, 2] }
|
||||
expected: 1
|
||||
hidden:
|
||||
- input: { nums: [0] }
|
||||
expected: 1
|
||||
- input: { nums: [1, 0] }
|
||||
expected: 2
|
||||
- input: { nums: [0, 2, 1] }
|
||||
expected: 2
|
||||
- input: { nums: [2, 0, 1] }
|
||||
expected: 3
|
||||
- input: { nums: [1, 2, 3, 0] }
|
||||
expected: 4
|
||||
|
||||
description: |
|
||||
You are given an integer array `nums` of length `n` where `nums` is a permutation of the numbers in the range `[0, n - 1]`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user