feat(content): hidden test cases
This commit is contained in:
@@ -11,6 +11,26 @@ patterns:
|
||||
- prefix-sum
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def max_total_fruits(fruits: list[list[int]], start_pos: int, k: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { fruits: [[2, 8], [6, 3], [8, 6]], start_pos: 5, k: 4 }
|
||||
expected: 9
|
||||
- input: { fruits: [[0, 9], [4, 1], [5, 7], [6, 2], [7, 4], [10, 9]], start_pos: 5, k: 4 }
|
||||
expected: 14
|
||||
- input: { fruits: [[0, 3], [6, 4], [8, 5]], start_pos: 3, k: 2 }
|
||||
expected: 0
|
||||
hidden:
|
||||
- input: { fruits: [[0, 10]], start_pos: 0, k: 0 }
|
||||
expected: 10
|
||||
- input: { fruits: [[5, 5]], start_pos: 5, k: 0 }
|
||||
expected: 5
|
||||
- input: { fruits: [[0, 5], [10, 5]], start_pos: 5, k: 5 }
|
||||
expected: 5
|
||||
- input: { fruits: [[1, 1], [2, 2], [3, 3]], start_pos: 2, k: 10 }
|
||||
expected: 6
|
||||
|
||||
description: |
|
||||
Fruits are available at some positions on an infinite x-axis. You are given a 2D integer array `fruits` where `fruits[i] = [position_i, amount_i]` depicts `amount_i` fruits at the position `position_i`. `fruits` is already **sorted** by `position_i` in **ascending order**, and each `position_i` is **unique**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user