solulubeta
Sign in
Story Problems / Dynamic programming
07.04 · Problem

Vending Machine Coins

Medium 1-D DP · unbounded, min count Pro

This problem is part of solulu Pro

A vending machine has unlimited coins of the given denominations. What is the fewest number of coins that make exactly amount? Return −1 if it is impossible.

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 78 of 94 · updated 2026-10-12