Problem · Graph

Currency Conversion Rate

MediumAmazonPHONE SCREEN
See Amazon hiring insights

A quick note: this came from a real AWS phone-screen interview report. The report shared a currency-conversion graph, directed rates such as USD -> JPY, a from/to query, and a rounded numeric result in the example. FastPrep added only the small runnable examples and wording needed for practice, strictly from those visible details and stated rules. The core task should be a close match; exact wording may differ because the report was a short write-up. If we come across a fuller version later, we'll come back and update this.

The problem statement continues
Pro
Examples
01 · Example 1
rates = [["USD","JPY","110"],["USD","AUD","1.45"],["JPY","GBP","0.0070"]]
query = ["GBP","AUD"]
return = "1.89"

Use the reverse of JPY -> GBP, then the reverse of USD -> JPY, then USD -> AUD: (1 / 0.0070) * (1 / 110) * 1.45 = 1.883..., which rounds to 1.89.

FastPrep Pro
Reported in 1 Amazon interview this week

Unlock the full problem

  • Full problem statement and constraints
  • 1 more worked example, explained
  • Guided hints and editorial
  • Run your code on real test cases
$9/month

Pro subscription, billed yearly — or $19 month-to-month. Cancel anytime.

Free plan — 2 of 2 free unlocks used this week
CodePython 3
Run and Submit unlock with Pro
FastPrep Pro
Reported in 1 Amazon interview this week

Unlock the full problem

  • Full problem statement and constraints
  • 1 more worked example, explained
  • Guided hints and editorial
  • Run your code on real test cases
$9/month

Pro subscription, billed yearly — or $19 month-to-month. Cancel anytime.

Free plan — 2 of 2 free unlocks used this week