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

@@ -9,6 +9,26 @@ categories:
patterns:
- binary-search
function_signature: "def find_min(nums: list[int]) -> int:"
test_cases:
visible:
- input: { nums: [3, 4, 5, 1, 2] }
expected: 1
- input: { nums: [4, 5, 6, 7, 0, 1, 2] }
expected: 0
- input: { nums: [11, 13, 15, 17] }
expected: 11
hidden:
- input: { nums: [1] }
expected: 1
- input: { nums: [2, 1] }
expected: 1
- input: { nums: [1, 2, 3, 4, 5] }
expected: 1
- input: { nums: [5, 1, 2, 3, 4] }
expected: 1
description: |
Suppose an array of length `n` sorted in ascending order is **rotated** between `1` and `n` times. For example, the array `nums = [0,1,2,4,5,6,7]` might become: