feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 72f7833c6c
commit a1a4eeaed7
134 changed files with 2075 additions and 0 deletions

View File

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