The Trade Desk Interview Question

Build an in-memory cache system in (C#, Java, or Python) with type-safe keys and values in a library format. Provide a LRU and a MRU replacement algorithm along with a custom replacement algorithm.