Cognizant interview question

Code lru cache, oops concepts