Algorithm · Coinbase · Hard
Best Exchange Rate Medium · Topics · Company Tags · Hints You are given a set of currency exchange pairs along with their conversion rates. For example, a rate like GBP → USD: 109.0 means 1 unit of GBP can be exchanged for 109.0 units of USD. Implement a class CurrencyConverter that supports the following operations: CurrencyConverter(String[] fromArr, String[] toArr, double[] rateArr) Initializes the converter. The arrays fromArr, toArr, and rateArr are parallel, where…
Checking your access…