QuikTrip Interview Question

Solving the right amount change?