Wise interview question

Caching, algorithms - exchange rate exercise