feat(content): hidden test cases
This commit is contained in:
@@ -10,6 +10,28 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def three_sum_closest(nums: list[int], target: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [-1, 2, 1, -4], target: 1 }
|
||||
expected: 2
|
||||
- input: { nums: [0, 0, 0], target: 1 }
|
||||
expected: 0
|
||||
hidden:
|
||||
- input: { nums: [1, 1, 1, 0], target: -100 }
|
||||
expected: 2
|
||||
- input: { nums: [1, 2, 3, 4, 5], target: 10 }
|
||||
expected: 10
|
||||
- input: { nums: [-1, 0, 1, 1, 55], target: 3 }
|
||||
expected: 2
|
||||
- input: { nums: [1, 1, -1, -1, 3], target: -1 }
|
||||
expected: -1
|
||||
- input: { nums: [-100, -50, 0, 50, 100], target: 1 }
|
||||
expected: 0
|
||||
- input: { nums: [4, 0, 5, -5, 3, 3, 0, -4, -5], target: -2 }
|
||||
expected: -2
|
||||
|
||||
description: |
|
||||
Given an integer array `nums` of length `n` and an integer `target`, find three integers in `nums` such that the sum is **closest** to `target`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user