This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
The problem https://leetcode.com/problems/coin-change/ You are given coins of different denominations and a total amount of money. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. Explanatory matrix Given the following input: coins = 1, 2, 5 amount = 11 We can construct…

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.