Minimum coin withdrawals for minimum count per type
Filed under Commvault
The question
Given an array representing the number of coins of each type in a bag, find the minimum withdrawals needed to have at least 5 coins of each type, picking one coin at a time, or return -1 if impossible.
No write-up yet. Related questions below have one.
Related Commvault questions
Collected from public candidate posts and coding forums. Updated Nov 2026.