Google Onsite | Currency Arbitrage | 2022
Anonymous User
2182
This is a similar question to https://leetcode.com/discuss/interview-question/483660/google-phone-currency-conversion but with a twist.
Input:
conversionRates- 2d float array of currency exchange rates.[i][j]= conversion from 1 unit oficurrency tojcurrency[i][j]may be DIFFERENT than[j][i]
startCurrency- integerendCurrency- integer
Output:
- Maximum
endCurrencypossible fromstartCurrencytoendCurrency
Notes:
- Currency A -> B may be DIFFERENT than B->A conversion
- You cannot convert to the same currency more than once
- Up to 18 currencies
Comments (7)


