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