RSS Amplifier

a code to joy · Jul 29, 2020

The coin change problem

0
Sign in to vote or save

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…

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 an explanatory matrix.

Read on /posts/2020/07/the-coin-change-problem/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.