Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2241. Design an ATM Machine
Design an ATM with five fixed denominations (20, 50, 100, 200, 500) that supports depositing counts of each bill and withdrawing a given amount. For withdraw, greedily take as many of the largest available bills as possible (500→20) and return the counts used or [-1] (and make no change) if that greedy process cannot produce the exact amount.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.