InterviewDB Question

Currency CLI: Build a Command-Line Currency Converter with Cached Exchange Rates

Question Details

Round 1 - Coding Problem Implement a command-line currency converter. The CLI accepts commands to set exchange rates, convert amounts, and query conversion chains (convert through an intermediate currency if a direct rate isn't available). Example Follow-ups Rates are bidirectional — if USD->EUR is 0.92, what is EUR->USD? How do you store both? How do you find the path that maximizes the converted amount (best rate) rather than any valid path? How do you detect arbitrage opportunities (a cycle w…

Full Details

🔒

Unlock all Ramp questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a ramp interview during the phone round.

It covers the following topics: Coding, Onsite, Phone .