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

@@ -9,6 +9,26 @@ categories:
patterns:
- binary-search
function_signature: "def search(nums: list[int], target: int) -> bool:"
test_cases:
visible:
- input: { nums: [2, 5, 6, 0, 0, 1, 2], target: 0 }
expected: true
- input: { nums: [2, 5, 6, 0, 0, 1, 2], target: 3 }
expected: false
hidden:
- input: { nums: [1], target: 1 }
expected: true
- input: { nums: [1], target: 0 }
expected: false
- input: { nums: [1, 1, 1, 1, 1], target: 1 }
expected: true
- input: { nums: [1, 0, 1, 1, 1], target: 0 }
expected: true
- input: { nums: [1, 3, 1, 1, 1], target: 3 }
expected: true
description: |
There is an integer array `nums` sorted in non-decreasing order (not necessarily with **distinct** values).