feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,30 @@ categories:
|
||||
patterns:
|
||||
- binary-search
|
||||
|
||||
function_signature: "def min_eating_speed(piles: list[int], h: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { piles: [3, 6, 7, 11], h: 8 }
|
||||
expected: 4
|
||||
- input: { piles: [30, 11, 23, 4, 20], h: 5 }
|
||||
expected: 30
|
||||
- input: { piles: [30, 11, 23, 4, 20], h: 6 }
|
||||
expected: 23
|
||||
hidden:
|
||||
- input: { piles: [1], h: 1 }
|
||||
expected: 1
|
||||
- input: { piles: [1, 1, 1, 1], h: 4 }
|
||||
expected: 1
|
||||
- input: { piles: [1000000000], h: 2 }
|
||||
expected: 500000000
|
||||
- input: { piles: [312884470], h: 968709470 }
|
||||
expected: 1
|
||||
- input: { piles: [2, 2], h: 2 }
|
||||
expected: 2
|
||||
- input: { piles: [5, 10, 3], h: 4 }
|
||||
expected: 6
|
||||
|
||||
description: |
|
||||
Koko loves to eat bananas. There are `n` piles of bananas, the i<sup>th</sup> pile has `piles[i]` bananas. The guards have gone and will come back in `h` hours.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user