Rippling interview question

BFS graph traversal problem for currency conversion