You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.
//Return the maximum number of ways that you can make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0
//Runtime complexity
//Quadratic, O(m×n), where m is the number of denominations and n is the total amount.
//Memory complexity
//O(n), where n is the total amount.
let solveCoinChange = function(denominations, amount) {