Rippling interview question

Grid-like problem, currency conversion problem (recursion)