Pergunta de entrevista da empresa Capital One

Find the minimum change given the denominations. (dynamic programming problem)