Skip to main content
All Questions

Find the minimum number of items of given sizes that make an exact total, or return -1.

Unlock detailed company stats for this questionUpgrade

A minimum-count variant of a classic problem: make an exact total from given sizes, returning -1 if impossible. Watch for integer overflow in the DP array. Essentially Coin Change (LC 322).

Format · Asked inside the hiring manager round.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

Behavioral Interviews: A Practical Guide for Engineers

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.