feat(content): more test cases
This commit is contained in:
@@ -9,6 +9,30 @@ categories:
|
||||
patterns:
|
||||
- dynamic-programming
|
||||
|
||||
function_signature: "def change(amount: int, coins: list[int]) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { amount: 5, coins: [1, 2, 5] }
|
||||
expected: 4
|
||||
- input: { amount: 3, coins: [2] }
|
||||
expected: 0
|
||||
- input: { amount: 10, coins: [10] }
|
||||
expected: 1
|
||||
hidden:
|
||||
- input: { amount: 0, coins: [1, 2, 5] }
|
||||
expected: 1
|
||||
- input: { amount: 1, coins: [1] }
|
||||
expected: 1
|
||||
- input: { amount: 100, coins: [1, 5, 10, 25] }
|
||||
expected: 242
|
||||
- input: { amount: 7, coins: [2, 3, 5] }
|
||||
expected: 2
|
||||
- input: { amount: 500, coins: [1, 2, 5] }
|
||||
expected: 12701
|
||||
- input: { amount: 4, coins: [1, 2, 3] }
|
||||
expected: 4
|
||||
|
||||
description: |
|
||||
You are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user