Cognizant Interview Question

Code lru cache, oops concepts