Google interview question

Currency conversion graph theory problem