Minimum coin change problem with limited amount of coins
问题 To be specific, the problem is: Given array of denominations coins[] , array of limit for each coins limits[] and number amount , return minimum number of coins needed, to get the amount , or if it's not possible return null. Additionally fill array change with number of each coin used in the solution. This is my solution: public static int? Dynamic(int amount, int[] coins, int[] limits, out int[] change) { int[] minCoins = new int[amount + 1]; int[,] coinsUsedToAmount = new int[coins.Length,