Rippling interview question

Design an algorithm that solves an ATM.