This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Solution { | |
public static int[] getMinimumNotesCombination(int targetAmount, int[] notes) { | |
final int INF = Integer.MAX_VALUE; | |
int notesCount = notes.length; | |
int[][] dp = new int[targetAmount + 1][notesCount]; // represents | |
// a combination of notes with minimum sum that gives you some amount |
NewerOlder