feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent d65ccf7dc2
commit 0262ca8bf6
203 changed files with 4526 additions and 0 deletions

View File

@@ -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]`.