feat(content): more test cases
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user