Example 1
Example 2
Example 3
1 <= initialCurrency.length <= 3initialCurrency consists only of uppercase English letters.1 <= n == pairs1.length <= 101 <= m == pairs2.length <= 10pairs1[i] == [startCurrencyi, targetCurrencyi]pairs2[i] == [startCurrencyi, targetCurrencyi]1 <= startCurrencyi.length, targetCurrencyi.length <= 3startCurrencyi and targetCurrencyi consist only of uppercase English letters.rates1.length == nrates2.length == m1.0 <= rates1[i], rates2[i] <= 10.0The input is generated such that there are no contradictions or cycles in the conversion graphs for either day.The input is generated such that the output is at most 5 * 1010.Example 1
Example 2
Example 3
1 <= initialCurrency.length <= 3initialCurrency consists only of uppercase English letters.1 <= n == pairs1.length <= 101 <= m == pairs2.length <= 10pairs1[i] == [startCurrencyi, targetCurrencyi]pairs2[i] == [startCurrencyi, targetCurrencyi]1 <= startCurrencyi.length, targetCurrencyi.length <= 3startCurrencyi and targetCurrencyi consist only of uppercase English letters.rates1.length == nrates2.length == m1.0 <= rates1[i], rates2[i] <= 10.0The input is generated such that there are no contradictions or cycles in the conversion graphs for either day.The input is generated such that the output is at most 5 * 1010.