Untitled

mail@pastecode.io avatar
unknown
plain_text
10 months ago
559 B
10
Indexable
Never
Question: Given the exhange rates between various currencies (e.g. USD IND 82, PND IND 90, etc). The input is not exhaustive, there could be some currencies missing. Given a set of queries (like convert 5 USD to IND, 2 PND to USD, 12 DNR IND etc.). If the convertion is not possible return an error msg.
How would you optimise data storage and query response. What will be the Time and Space Complexity.
Keep in mind that the currency exchange rates keep changing every sec.

above question was asked in amamzon interview LLD...can you please code in java