feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent e28da5def2
commit 0f264ef603
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,24 @@ patterns:
- fast-slow-pointers
- binary-search
function_signature: "def find_duplicate(nums: list[int]) -> int:"
test_cases:
visible:
- input: { nums: [1, 3, 4, 2, 2] }
expected: 2
- input: { nums: [3, 1, 3, 4, 2] }
expected: 3
- input: { nums: [3, 3, 3, 3, 3] }
expected: 3
hidden:
- input: { nums: [1, 1] }
expected: 1
- input: { nums: [2, 2, 2, 2, 2] }
expected: 2
- input: { nums: [1, 4, 4, 2, 4] }
expected: 4
description: |
Given an array of integers `nums` containing `n + 1` integers where each integer is in the range `[1, n]` inclusive.