Rippling Interview Question

Design an algorithm that solves an ATM.